mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Yuval Mintz <Yuval.Mintz@qlogic.com>,
	Ariel Elior <Ariel.Elior@qlogic.com>,
	everest-linux-l2@qlogic.com
Cc: Arnd Bergmann <arnd@arndb.de>,
	"David S. Miller" <davem@davemloft.net>,
	Sudarsana Reddy Kalluru <sudarsana.kalluru@qlogic.com>,
	Manish Chopra <manish.chopra@qlogic.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH, net-next] qede: hide 32-bit compile warning
Date: Fri, 26 Aug 2016 17:37:53 +0200	[thread overview]
Message-ID: <20160826153808.838861-1-arnd@arndb.de> (raw)

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.")
---
 drivers/net/ethernet/qlogic/qede/qede_ethtool.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/qlogic/qede/qede_ethtool.c b/drivers/net/ethernet/qlogic/qede/qede_ethtool.c
index 4d45945bc34c..14d5328e6ac9 100644
--- a/drivers/net/ethernet/qlogic/qede/qede_ethtool.c
+++ b/drivers/net/ethernet/qlogic/qede/qede_ethtool.c
@@ -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 {
-- 
2.9.0

             reply	other threads:[~2016-08-26 15:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-26 15:37 Arnd Bergmann [this message]
2016-08-26 16:51 ` Joe Perches
2016-08-31  6:35 ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160826153808.838861-1-arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=Ariel.Elior@qlogic.com \
    --cc=Yuval.Mintz@qlogic.com \
    --cc=davem@davemloft.net \
    --cc=everest-linux-l2@qlogic.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=manish.chopra@qlogic.com \
    --cc=netdev@vger.kernel.org \
    --cc=sudarsana.kalluru@qlogic.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®