* [PATCH 1/3] net: vlan: fix up vlan_proto_idx() for CONFIG_BUG=n
@ 2013-04-21 10:09 Patrick McHardy
2013-04-21 10:09 ` [PATCH 2/3] net: fix netdev features shift for features bit > 31 Patrick McHardy
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Patrick McHardy @ 2013-04-21 10:09 UTC (permalink / raw)
To: davem; +Cc: netdev, amwang
Add missing return statement for CONFIG_BUG=n.
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
---
net/8021q/vlan.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/8021q/vlan.h b/net/8021q/vlan.h
index abc9cb6..ba5983f 100644
--- a/net/8021q/vlan.h
+++ b/net/8021q/vlan.h
@@ -121,6 +121,7 @@ static inline unsigned int vlan_proto_idx(__be16 proto)
return VLAN_PROTO_8021AD;
default:
BUG();
+ return 0;
}
}
--
1.8.1.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/3] net: fix netdev features shift for features bit > 31
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
2013-04-21 19:50 ` David Miller
2013-04-21 10:09 ` [PATCH 3/3] qeth: fix VLAN related compilation errors Patrick McHardy
2013-04-21 19:58 ` [PATCH 1/3] net: vlan: fix up vlan_proto_idx() for CONFIG_BUG=n David Miller
2 siblings, 1 reply; 7+ messages in thread
From: Patrick McHardy @ 2013-04-21 10:09 UTC (permalink / raw)
To: davem; +Cc: netdev, amwang
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
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 3/3] qeth: fix VLAN related compilation errors
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 ` [PATCH 2/3] net: fix netdev features shift for features bit > 31 Patrick McHardy
@ 2013-04-21 10:09 ` 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
2 siblings, 1 reply; 7+ messages in thread
From: Patrick McHardy @ 2013-04-21 10:09 UTC (permalink / raw)
To: davem; +Cc: netdev, amwang
drivers/s390/net/qeth_l3_main.c: In function 'qeth_l3_add_vlan_mc':
>> drivers/s390/net/qeth_l3_main.c:1662:3: error: too few arguments to function '__vlan_find_dev_deep'
include/linux/if_vlan.h:88:27: note: declared here
drivers/s390/net/qeth_l3_main.c: In function 'qeth_l3_add_vlan_mc6':
>> drivers/s390/net/qeth_l3_main.c:1723:3: error: too few arguments to function '__vlan_find_dev_deep'
include/linux/if_vlan.h:88:27: note: declared here
drivers/s390/net/qeth_l3_main.c: In function 'qeth_l3_free_vlan_addresses4':
>> drivers/s390/net/qeth_l3_main.c:1767:2: error: too few arguments to function '__vlan_find_dev_deep'
include/linux/if_vlan.h:88:27: note: declared here
drivers/s390/net/qeth_l3_main.c: In function 'qeth_l3_free_vlan_addresses6':
>> drivers/s390/net/qeth_l3_main.c:1797:2: error: too few arguments to function '__vlan_find_dev_deep'
include/linux/if_vlan.h:88:27: note: declared here
drivers/s390/net/qeth_l3_main.c: In function 'qeth_l3_process_inbound_buffer':
>> drivers/s390/net/qeth_l3_main.c:1980:6: error: too few arguments to function '__vlan_hwaccel_put_tag'
include/linux/if_vlan.h:234:31: note: declared here
drivers/s390/net/qeth_l3_main.c: In function 'qeth_l3_verify_vlan_dev':
>> drivers/s390/net/qeth_l3_main.c:2089:3: error: too few arguments to function '__vlan_find_dev_deep'
include/linux/if_vlan.h:88:27: note: declared here
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
---
drivers/s390/net/qeth_l3_main.c | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c
index 6426868..c915e5c 100644
--- a/drivers/s390/net/qeth_l3_main.c
+++ b/drivers/s390/net/qeth_l3_main.c
@@ -1659,7 +1659,8 @@ static void qeth_l3_add_vlan_mc(struct qeth_card *card)
for_each_set_bit(vid, card->active_vlans, VLAN_N_VID) {
struct net_device *netdev;
- netdev = __vlan_find_dev_deep(card->dev, vid);
+ netdev = __vlan_find_dev_deep(card->dev, htons(ETH_P_8021Q),
+ vid);
if (netdev == NULL ||
!(netdev->flags & IFF_UP))
continue;
@@ -1720,7 +1721,8 @@ static void qeth_l3_add_vlan_mc6(struct qeth_card *card)
for_each_set_bit(vid, card->active_vlans, VLAN_N_VID) {
struct net_device *netdev;
- netdev = __vlan_find_dev_deep(card->dev, vid);
+ netdev = __vlan_find_dev_deep(card->dev, htons(ETH_P_8021Q),
+ vid);
if (netdev == NULL ||
!(netdev->flags & IFF_UP))
continue;
@@ -1764,7 +1766,7 @@ static void qeth_l3_free_vlan_addresses4(struct qeth_card *card,
QETH_CARD_TEXT(card, 4, "frvaddr4");
- netdev = __vlan_find_dev_deep(card->dev, vid);
+ netdev = __vlan_find_dev_deep(card->dev, htons(ETH_P_8021Q), vid);
if (!netdev)
return;
in_dev = in_dev_get(netdev);
@@ -1794,7 +1796,7 @@ static void qeth_l3_free_vlan_addresses6(struct qeth_card *card,
QETH_CARD_TEXT(card, 4, "frvaddr6");
- netdev = __vlan_find_dev_deep(card->dev, vid);
+ netdev = __vlan_find_dev_deep(card->dev, htons(ETH_P_8021Q), vid);
if (!netdev)
return;
in6_dev = in6_dev_get(netdev);
@@ -1977,7 +1979,8 @@ static int qeth_l3_process_inbound_buffer(struct qeth_card *card,
&vlan_tag);
len = skb->len;
if (is_vlan && !card->options.sniffer)
- __vlan_hwaccel_put_tag(skb, vlan_tag);
+ __vlan_hwaccel_put_tag(skb,
+ htons(ETH_P_8021Q), vlan_tag);
napi_gro_receive(&card->napi, skb);
}
break;
@@ -2086,7 +2089,8 @@ static int qeth_l3_verify_vlan_dev(struct net_device *dev,
struct net_device *netdev;
rcu_read_lock();
- netdev = __vlan_find_dev_deep(card->dev, vid);
+ netdev = __vlan_find_dev_deep(card->dev, htons(ETH_P_8021Q),
+ vid);
rcu_read_unlock();
if (netdev == dev) {
rc = QETH_VLAN_CARD;
--
1.8.1.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 2/3] net: fix netdev features shift for features bit > 31
2013-04-21 10:09 ` [PATCH 2/3] net: fix netdev features shift for features bit > 31 Patrick McHardy
@ 2013-04-21 19:50 ` David Miller
2013-04-21 20:43 ` Patrick McHardy
0 siblings, 1 reply; 7+ messages in thread
From: David Miller @ 2013-04-21 19:50 UTC (permalink / raw)
To: kaber; +Cc: netdev, amwang
From: Patrick McHardy <kaber@trash.net>
Date: Sun, 21 Apr 2013 12:09:33 +0200
> 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>
The limitation is in the variable being assigned to, not the value
itself.
The "1" is already cast to a netdev_features_t by the macro
definition.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/3] net: vlan: fix up vlan_proto_idx() for CONFIG_BUG=n
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 ` [PATCH 2/3] net: fix netdev features shift for features bit > 31 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
2 siblings, 0 replies; 7+ messages in thread
From: David Miller @ 2013-04-21 19:58 UTC (permalink / raw)
To: kaber; +Cc: netdev, amwang
From: Patrick McHardy <kaber@trash.net>
Date: Sun, 21 Apr 2013 12:09:32 +0200
> Add missing return statement for CONFIG_BUG=n.
>
> Reported-by: kbuild test robot <fengguang.wu@intel.com>
> Signed-off-by: Patrick McHardy <kaber@trash.net>
Applied.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 3/3] qeth: fix VLAN related compilation errors
2013-04-21 10:09 ` [PATCH 3/3] qeth: fix VLAN related compilation errors Patrick McHardy
@ 2013-04-21 19:58 ` David Miller
0 siblings, 0 replies; 7+ messages in thread
From: David Miller @ 2013-04-21 19:58 UTC (permalink / raw)
To: kaber; +Cc: netdev, amwang
From: Patrick McHardy <kaber@trash.net>
Date: Sun, 21 Apr 2013 12:09:34 +0200
> drivers/s390/net/qeth_l3_main.c: In function 'qeth_l3_add_vlan_mc':
>>> drivers/s390/net/qeth_l3_main.c:1662:3: error: too few arguments to function '__vlan_find_dev_deep'
> include/linux/if_vlan.h:88:27: note: declared here
...
> Reported-by: kbuild test robot <fengguang.wu@intel.com>
> Signed-off-by: Patrick McHardy <kaber@trash.net>
Applied.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/3] net: fix netdev features shift for features bit > 31
2013-04-21 19:50 ` David Miller
@ 2013-04-21 20:43 ` Patrick McHardy
0 siblings, 0 replies; 7+ messages in thread
From: Patrick McHardy @ 2013-04-21 20:43 UTC (permalink / raw)
To: David Miller; +Cc: netdev, amwang
David Miller <davem@davemloft.net> schrieb:
>From: Patrick McHardy <kaber@trash.net>
>Date: Sun, 21 Apr 2013 12:09:33 +0200
>
>> 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>
>
>The limitation is in the variable being assigned to, not the value
>itself.
>
>The "1" is already cast to a netdev_features_t by the macro
>definition.
Right, I thought the warning was caused by the shift not being able to represent the result. I'll fix it up properly later.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2013-04-21 20:59 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [PATCH 2/3] net: fix netdev features shift for features bit > 31 Patrick McHardy
2013-04-21 19:50 ` 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
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.