From: Tony Nguyen Date: Thu, 1 Jun 2017 19:06:05 +0000 (-0700) Subject: ixgbe: Resolve cppcheck format string warning X-Git-Tag: v4.1.12-117.0_27200813_3~195 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=206ce0910cfbb7b7d1312a5b6cc81ace9a34a56f;p=users%2Fjedix%2Flinux-maple.git ixgbe: Resolve cppcheck format string warning 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 Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher Orabug: 26785078 (cherry picked from commit 4ebdf8af3017ce242f37be2ae5e5f655dc9846ef) Signed-off-by: Jack Vogel Reviewed-by: Ethan Zhao --- diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c index 755e55df0331..96720ec300ed 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c @@ -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: