@@ -212,12 +212,14 @@ static void efx_mcdi_send_request(struct efx_nic *efx, unsigned cmd,
212
212
* progress on a NIC at any one time. So no need for locking.
213
213
*/
214
214
for (i = 0 ; i < hdr_len / 4 && bytes < PAGE_SIZE ; i ++ )
215
- bytes += snprintf (buf + bytes , PAGE_SIZE - bytes ,
216
- " %08x" , le32_to_cpu (hdr [i ].u32 [0 ]));
215
+ bytes += scnprintf (buf + bytes , PAGE_SIZE - bytes ,
216
+ " %08x" ,
217
+ le32_to_cpu (hdr [i ].u32 [0 ]));
217
218
218
219
for (i = 0 ; i < inlen / 4 && bytes < PAGE_SIZE ; i ++ )
219
- bytes += snprintf (buf + bytes , PAGE_SIZE - bytes ,
220
- " %08x" , le32_to_cpu (inbuf [i ].u32 [0 ]));
220
+ bytes += scnprintf (buf + bytes , PAGE_SIZE - bytes ,
221
+ " %08x" ,
222
+ le32_to_cpu (inbuf [i ].u32 [0 ]));
221
223
222
224
netif_info (efx , hw , efx -> net_dev , "MCDI RPC REQ:%s\n" , buf );
223
225
}
@@ -302,15 +304,15 @@ static void efx_mcdi_read_response_header(struct efx_nic *efx)
302
304
*/
303
305
for (i = 0 ; i < hdr_len && bytes < PAGE_SIZE ; i ++ ) {
304
306
efx -> type -> mcdi_read_response (efx , & hdr , (i * 4 ), 4 );
305
- bytes += snprintf (buf + bytes , PAGE_SIZE - bytes ,
306
- " %08x" , le32_to_cpu (hdr .u32 [0 ]));
307
+ bytes += scnprintf (buf + bytes , PAGE_SIZE - bytes ,
308
+ " %08x" , le32_to_cpu (hdr .u32 [0 ]));
307
309
}
308
310
309
311
for (i = 0 ; i < data_len && bytes < PAGE_SIZE ; i ++ ) {
310
312
efx -> type -> mcdi_read_response (efx , & hdr ,
311
313
mcdi -> resp_hdr_len + (i * 4 ), 4 );
312
- bytes += snprintf (buf + bytes , PAGE_SIZE - bytes ,
313
- " %08x" , le32_to_cpu (hdr .u32 [0 ]));
314
+ bytes += scnprintf (buf + bytes , PAGE_SIZE - bytes ,
315
+ " %08x" , le32_to_cpu (hdr .u32 [0 ]));
314
316
}
315
317
316
318
netif_info (efx , hw , efx -> net_dev , "MCDI RPC RESP:%s\n" , buf );
@@ -1417,19 +1419,21 @@ void efx_mcdi_print_fwver(struct efx_nic *efx, char *buf, size_t len)
1417
1419
}
1418
1420
1419
1421
ver_words = (__le16 * )MCDI_PTR (outbuf , GET_VERSION_OUT_VERSION );
1420
- offset = snprintf (buf , len , "%u.%u.%u.%u" ,
1421
- le16_to_cpu (ver_words [0 ]), le16_to_cpu (ver_words [1 ]),
1422
- le16_to_cpu (ver_words [2 ]), le16_to_cpu (ver_words [3 ]));
1422
+ offset = scnprintf (buf , len , "%u.%u.%u.%u" ,
1423
+ le16_to_cpu (ver_words [0 ]),
1424
+ le16_to_cpu (ver_words [1 ]),
1425
+ le16_to_cpu (ver_words [2 ]),
1426
+ le16_to_cpu (ver_words [3 ]));
1423
1427
1424
1428
/* EF10 may have multiple datapath firmware variants within a
1425
1429
* single version. Report which variants are running.
1426
1430
*/
1427
1431
if (efx_nic_rev (efx ) >= EFX_REV_HUNT_A0 ) {
1428
1432
struct efx_ef10_nic_data * nic_data = efx -> nic_data ;
1429
1433
1430
- offset += snprintf (buf + offset , len - offset , " rx%x tx%x" ,
1431
- nic_data -> rx_dpcpu_fw_id ,
1432
- nic_data -> tx_dpcpu_fw_id );
1434
+ offset += scnprintf (buf + offset , len - offset , " rx%x tx%x" ,
1435
+ nic_data -> rx_dpcpu_fw_id ,
1436
+ nic_data -> tx_dpcpu_fw_id );
1433
1437
1434
1438
/* It's theoretically possible for the string to exceed 31
1435
1439
* characters, though in practice the first three version
0 commit comments