]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
ixgbe: Resolve cppcheck format string warning
authorTony Nguyen <anthony.l.nguyen@intel.com>
Thu, 1 Jun 2017 19:06:05 +0000 (12:06 -0700)
committerJack Vogel <jack.vogel@oracle.com>
Fri, 13 Oct 2017 02:43:49 +0000 (19:43 -0700)
cppcheck warns that the format string is incorrect in the function
ixgbe_get_strings().  Since the value cannot be negative, change the
variable to unsigned which matches the format specifier.

Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Orabug: 26785078
(cherry picked from commit 4ebdf8af3017ce242f37be2ae5e5f655dc9846ef)
Signed-off-by: Jack Vogel <jack.vogel@oracle.com>
Reviewed-by: Ethan Zhao <ethan.zhao@oracle.com>
drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c

index 755e55df033159bec1c9945d7282ebc87217c9ab..96720ec300ed7650be221b891f8472f471145193 100644 (file)
@@ -1263,7 +1263,7 @@ static void ixgbe_get_strings(struct net_device *netdev, u32 stringset,
                              u8 *data)
 {
        char *p = (char *)data;
-       int i;
+       unsigned int i;
 
        switch (stringset) {
        case ETH_SS_TEST: