public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, amwang@redhat.com
Subject: [PATCH 2/3] net: fix netdev features shift for features bit > 31
Date: Sun, 21 Apr 2013 12:09:33 +0200	[thread overview]
Message-ID: <1366538974-4589-2-git-send-email-kaber@trash.net> (raw)
In-Reply-To: <1366538974-4589-1-git-send-email-kaber@trash.net>

   drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c: In function 'qlcnic_set_netdev_features':
>> drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c:967:7: warning: large integer implicitly truncated to unsigned type [-Woverflow]

This should be fixed by explicitly using 1ULL for the shifted value.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
---
 include/linux/netdev_features.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/netdev_features.h b/include/linux/netdev_features.h
index cbaa027..f4d20f5 100644
--- a/include/linux/netdev_features.h
+++ b/include/linux/netdev_features.h
@@ -71,7 +71,7 @@ enum {
 };
 
 /* copy'n'paste compression ;) */
-#define __NETIF_F_BIT(bit)	((netdev_features_t)1 << (bit))
+#define __NETIF_F_BIT(bit)	((netdev_features_t)1ULL << (bit))
 #define __NETIF_F(name)		__NETIF_F_BIT(NETIF_F_##name##_BIT)
 
 #define NETIF_F_FCOE_CRC	__NETIF_F(FCOE_CRC)
-- 
1.8.1.4

  reply	other threads:[~2013-04-21 10:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-21 10:09 [PATCH 1/3] net: vlan: fix up vlan_proto_idx() for CONFIG_BUG=n Patrick McHardy
2013-04-21 10:09 ` Patrick McHardy [this message]
2013-04-21 19:50   ` [PATCH 2/3] net: fix netdev features shift for features bit > 31 David Miller
2013-04-21 20:43     ` Patrick McHardy
2013-04-21 10:09 ` [PATCH 3/3] qeth: fix VLAN related compilation errors Patrick McHardy
2013-04-21 19:58   ` David Miller
2013-04-21 19:58 ` [PATCH 1/3] net: vlan: fix up vlan_proto_idx() for CONFIG_BUG=n 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=1366538974-4589-2-git-send-email-kaber@trash.net \
    --to=kaber@trash.net \
    --cc=amwang@redhat.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /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