All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@vyatta.com>
To: Fengguang Wu <fengguang.wu@intel.com>
Cc: kernel-janitors@vger.kernel.org, netdev@vger.kernel.org
Subject: [PATCH] gre: fix sparse warning
Date: Mon, 01 Oct 2012 15:21:14 +0000	[thread overview]
Message-ID: <20121001082114.0803f6d1@nehalam.linuxnetplumber.net> (raw)
In-Reply-To: <20120929011210.GA10053@localhost>

Use be16 consistently when looking at flags.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>


--- a/net/ipv4/ip_gre.c	2012-09-27 15:47:35.076895836 -0700
+++ b/net/ipv4/ip_gre.c	2012-10-01 08:18:50.990145746 -0700
@@ -222,7 +222,7 @@ static struct rtnl_link_stats64 *ipgre_g
 
 /* Does key in tunnel parameters match packet */
 static bool ipgre_key_match(const struct ip_tunnel_parm *p,
-			    __u32 flags, __be32 key)
+			    __be16 flags, __be32 key)
 {
 	if (p->i_flags & GRE_KEY) {
 		if (flags & GRE_KEY)
@@ -237,7 +237,7 @@ static bool ipgre_key_match(const struct
 
 static struct ip_tunnel *ipgre_tunnel_lookup(struct net_device *dev,
 					     __be32 remote, __be32 local,
-					     __u32 flags, __be32 key,
+					     __be16 flags, __be32 key,
 					     __be16 gre_proto)
 {
 	struct net *net = dev_net(dev);

WARNING: multiple messages have this Message-ID (diff)
From: Stephen Hemminger <shemminger@vyatta.com>
To: Fengguang Wu <fengguang.wu@intel.com>
Cc: kernel-janitors@vger.kernel.org, netdev@vger.kernel.org
Subject: [PATCH] gre: fix sparse warning
Date: Mon, 1 Oct 2012 08:21:14 -0700	[thread overview]
Message-ID: <20121001082114.0803f6d1@nehalam.linuxnetplumber.net> (raw)
In-Reply-To: <20120929011210.GA10053@localhost>

Use be16 consistently when looking at flags.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>


--- a/net/ipv4/ip_gre.c	2012-09-27 15:47:35.076895836 -0700
+++ b/net/ipv4/ip_gre.c	2012-10-01 08:18:50.990145746 -0700
@@ -222,7 +222,7 @@ static struct rtnl_link_stats64 *ipgre_g
 
 /* Does key in tunnel parameters match packet */
 static bool ipgre_key_match(const struct ip_tunnel_parm *p,
-			    __u32 flags, __be32 key)
+			    __be16 flags, __be32 key)
 {
 	if (p->i_flags & GRE_KEY) {
 		if (flags & GRE_KEY)
@@ -237,7 +237,7 @@ static bool ipgre_key_match(const struct
 
 static struct ip_tunnel *ipgre_tunnel_lookup(struct net_device *dev,
 					     __be32 remote, __be32 local,
-					     __u32 flags, __be32 key,
+					     __be16 flags, __be32 key,
 					     __be16 gre_proto)
 {
 	struct net *net = dev_net(dev);

  reply	other threads:[~2012-10-01 15:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-29  1:12 [wireless-next:for-davem 123/299] net/ipv4/ip_gre.c:222:29: sparse: restricted __be16 degrades to in Fengguang Wu
2012-09-29  1:12 ` [wireless-next:for-davem 123/299] net/ipv4/ip_gre.c:222:29: sparse: restricted __be16 degrades to integer Fengguang Wu
2012-10-01 15:21 ` Stephen Hemminger [this message]
2012-10-01 15:21   ` [PATCH] gre: fix sparse warning Stephen Hemminger
2012-10-01 21:36   ` David Miller
2012-10-01 21:36     ` 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=20121001082114.0803f6d1@nehalam.linuxnetplumber.net \
    --to=shemminger@vyatta.com \
    --cc=fengguang.wu@intel.com \
    --cc=kernel-janitors@vger.kernel.org \
    --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 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.