diff mbox

[net-next] tc_vlan: fix type of tcfv_push_vid

Message ID 1416825026-4628-1-git-send-email-jiri@resnulli.us
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Jiri Pirko Nov. 24, 2014, 10:30 a.m. UTC
Should be u16. So fix it to kill the sparse warning.

Fixes: c7e2b9689ef8136 "sched: introduce vlan action"
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
---
 include/net/tc_act/tc_vlan.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jamal Hadi Salim Nov. 24, 2014, 1:25 p.m. UTC | #1
On 11/24/14 05:30, Jiri Pirko wrote:
> Should be u16. So fix it to kill the sparse warning.
>
> Fixes: c7e2b9689ef8136 "sched: introduce vlan action"
> Signed-off-by: Jiri Pirko <jiri@resnulli.us>
> ---
>   include/net/tc_act/tc_vlan.h | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/net/tc_act/tc_vlan.h b/include/net/tc_act/tc_vlan.h
> index c809c1d..93b70ad 100644
> --- a/include/net/tc_act/tc_vlan.h
> +++ b/include/net/tc_act/tc_vlan.h
> @@ -18,7 +18,7 @@
>   struct tcf_vlan {
>   	struct tcf_common	common;
>   	int			tcfv_action;
> -	__be16			tcfv_push_vid;
> +	u16			tcfv_push_vid;
>   	__be16			tcfv_push_proto;


User space sends you this in be, no? I thought it was fine
the way it is. Isnt __be16 just an annotation?

cheers,
jamal

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Jiri Pirko Nov. 24, 2014, 1:33 p.m. UTC | #2
Mon, Nov 24, 2014 at 02:25:52PM CET, jhs@mojatatu.com wrote:
>On 11/24/14 05:30, Jiri Pirko wrote:
>>Should be u16. So fix it to kill the sparse warning.
>>
>>Fixes: c7e2b9689ef8136 "sched: introduce vlan action"
>>Signed-off-by: Jiri Pirko <jiri@resnulli.us>
>>---
>>  include/net/tc_act/tc_vlan.h | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>>diff --git a/include/net/tc_act/tc_vlan.h b/include/net/tc_act/tc_vlan.h
>>index c809c1d..93b70ad 100644
>>--- a/include/net/tc_act/tc_vlan.h
>>+++ b/include/net/tc_act/tc_vlan.h
>>@@ -18,7 +18,7 @@
>>  struct tcf_vlan {
>>  	struct tcf_common	common;
>>  	int			tcfv_action;
>>-	__be16			tcfv_push_vid;
>>+	u16			tcfv_push_vid;
>>  	__be16			tcfv_push_proto;
>
>
>User space sends you this in be, no? I thought it was fine
>the way it is. Isnt __be16 just an annotation?

No, userspace sends this in host. Therefore we should store it in host,
not in be. It is just an annotation.

>
>cheers,
>jamal
>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller Nov. 24, 2014, 9:12 p.m. UTC | #3
From: Jiri Pirko <jiri@resnulli.us>
Date: Mon, 24 Nov 2014 11:30:26 +0100

> Should be u16. So fix it to kill the sparse warning.
> 
> Fixes: c7e2b9689ef8136 "sched: introduce vlan action"
> Signed-off-by: Jiri Pirko <jiri@resnulli.us>

Applied, thanks Jiri.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/include/net/tc_act/tc_vlan.h b/include/net/tc_act/tc_vlan.h
index c809c1d..93b70ad 100644
--- a/include/net/tc_act/tc_vlan.h
+++ b/include/net/tc_act/tc_vlan.h
@@ -18,7 +18,7 @@ 
 struct tcf_vlan {
 	struct tcf_common	common;
 	int			tcfv_action;
-	__be16			tcfv_push_vid;
+	u16			tcfv_push_vid;
 	__be16			tcfv_push_proto;
 };
 #define to_vlan(a) \