Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

i40evf: fix scan warning on sprintf

The driver was converted to use snprintf everywhere but this one function.
Just use snprintf, instead of sprintf.

Also a small spelling correction in a comment.

Change-ID: I59d45f94a52754c7b4cd6034df9a61d8132b7f77
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Sibai Li <sibai.li@intel.com>
Signed-off-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Jesse Brandeburg and committed by
David S. Miller
b39c1e2c 738abbac

+3 -2
+1 -1
drivers/net/ethernet/intel/i40evf/i40evf_ethtool.c
··· 193 193 } 194 194 195 195 /** 196 - * i40evf_get_drvinto - Get driver info 196 + * i40evf_get_drvinfo - Get driver info 197 197 * @netdev: network interface device structure 198 198 * @drvinfo: ethool driver info structure 199 199 *
+2 -1
drivers/net/ethernet/intel/i40evf/i40evf_main.c
··· 527 527 struct net_device *netdev = adapter->netdev; 528 528 int err; 529 529 530 - sprintf(adapter->misc_vector_name, "i40evf:mbx"); 530 + snprintf(adapter->misc_vector_name, 531 + sizeof(adapter->misc_vector_name) - 1, "i40evf:mbx"); 531 532 err = request_irq(adapter->msix_entries[0].vector, 532 533 &i40evf_msix_aq, 0, 533 534 adapter->misc_vector_name, netdev);