fm10k: use an unsigned int for i in ethtool_get_strings
authorJacob Keller <jacob.e.keller@intel.com>
Tue, 16 Jun 2015 20:39:11 +0000 (13:39 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Wed, 17 Jun 2015 21:20:52 +0000 (14:20 -0700)
The value will never be negative, and we use the %u print format. Thus,
use unsigned int for the loop counter. Issue found using cppcheck.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c

index 4b9d9f88af706760ab7484401e1c4000eb68087c..06f0b08d9af5745e8f4ba729877157b1b8ea808d 100644 (file)
@@ -124,7 +124,7 @@ static void fm10k_get_strings(struct net_device *dev, u32 stringset, u8 *data)
 {
        struct fm10k_intfc *interface = netdev_priv(dev);
        char *p = (char *)data;
-       int i;
+       unsigned int i;
 
        switch (stringset) {
        case ETH_SS_TEST: