* [PATCH net-next] net/sched: act_vlan: declare push_vid with host byte order
@ 2018-03-23 18:31 Davide Caratti
2018-03-24 1:54 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Davide Caratti @ 2018-03-23 18:31 UTC (permalink / raw)
To: Jiri Pirko, David S. Miller; +Cc: netdev
use u16 in place of __be16 to suppress the following sparse warnings:
net/sched/act_vlan.c:150:26: warning: incorrect type in assignment (different base types)
net/sched/act_vlan.c:150:26: expected restricted __be16 [usertype] push_vid
net/sched/act_vlan.c:150:26: got unsigned short
net/sched/act_vlan.c:151:21: warning: restricted __be16 degrades to integer
net/sched/act_vlan.c:208:26: warning: incorrect type in assignment (different base types)
net/sched/act_vlan.c:208:26: expected unsigned short [unsigned] [usertype] tcfv_push_vid
net/sched/act_vlan.c:208:26: got restricted __be16 [usertype] push_vid
Signed-off-by: Davide Caratti <dcaratti@redhat.com>
---
net/sched/act_vlan.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/sched/act_vlan.c b/net/sched/act_vlan.c
index 4595391c2129..41a66effeb5f 100644
--- a/net/sched/act_vlan.c
+++ b/net/sched/act_vlan.c
@@ -117,7 +117,7 @@ static int tcf_vlan_init(struct net *net, struct nlattr *nla,
struct tc_vlan *parm;
struct tcf_vlan *v;
int action;
- __be16 push_vid = 0;
+ u16 push_vid = 0;
__be16 push_proto = 0;
u8 push_prio = 0;
bool exists = false;
--
2.14.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] net/sched: act_vlan: declare push_vid with host byte order
2018-03-23 18:31 [PATCH net-next] net/sched: act_vlan: declare push_vid with host byte order Davide Caratti
@ 2018-03-24 1:54 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2018-03-24 1:54 UTC (permalink / raw)
To: dcaratti; +Cc: jiri, netdev
From: Davide Caratti <dcaratti@redhat.com>
Date: Fri, 23 Mar 2018 19:31:30 +0100
> use u16 in place of __be16 to suppress the following sparse warnings:
>
> net/sched/act_vlan.c:150:26: warning: incorrect type in assignment (different base types)
> net/sched/act_vlan.c:150:26: expected restricted __be16 [usertype] push_vid
> net/sched/act_vlan.c:150:26: got unsigned short
> net/sched/act_vlan.c:151:21: warning: restricted __be16 degrades to integer
> net/sched/act_vlan.c:208:26: warning: incorrect type in assignment (different base types)
> net/sched/act_vlan.c:208:26: expected unsigned short [unsigned] [usertype] tcfv_push_vid
> net/sched/act_vlan.c:208:26: got restricted __be16 [usertype] push_vid
>
> Signed-off-by: Davide Caratti <dcaratti@redhat.com>
Also applied, thanks Davide.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-03-24 1:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-23 18:31 [PATCH net-next] net/sched: act_vlan: declare push_vid with host byte order Davide Caratti
2018-03-24 1:54 ` 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.