]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
qede: hide 32-bit compile warning
authorArnd Bergmann <arnd@arndb.de>
Fri, 26 Aug 2016 15:37:53 +0000 (17:37 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 31 Aug 2016 06:35:15 +0000 (23:35 -0700)
The addition of the per-queue statistics introduced a harmless warning
on all 32-bit architectures:

drivers/net/ethernet/qlogic/qede/qede_ethtool.c: In function 'qede_get_ethtool_stats':
drivers/net/ethernet/qlogic/qede/qede_ethtool.c:244:31: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
      buf[cnt++] = QEDE_TQSTATS_DATA(edev,
                               ^
drivers/net/ethernet/qlogic/qede/qede_ethtool.c:244:22: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
      buf[cnt++] = QEDE_TQSTATS_DATA(edev,
                      ^
This changes the cast to 'void *' to shut up the warning, which
avoids the assumptions on the size of the pointer type.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 68db9ec2df07 ("qede: Add support for per-queue stats.")
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qlogic/qede/qede_ethtool.c

index 4d45945bc34c06eb7fe313513453310e304f9587..14d5328e6ac9196486739bbf4554c3dd7b191b7b 100644 (file)
@@ -60,7 +60,7 @@ static const struct {
 };
 
 #define QEDE_TQSTATS_DATA(dev, sindex, tssid, tcid) \
-       (*((u64 *)(((u64)(&dev->fp_array[tssid].txqs[tcid])) +\
+       (*((u64 *)(((void *)(&dev->fp_array[tssid].txqs[tcid])) +\
                   qede_tqstats_arr[(sindex)].offset)))
 
 static const struct {