From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH] netfilter: nft_redir: fix sparse warnings: cast to restricted __be32
Date: Wed, 12 Nov 2014 12:56:51 +0100 [thread overview]
Message-ID: <20141112115651.GA32330@salvia> (raw)
In-Reply-To: <20141112111039.323.26439.stgit@nfdev.cica.es>
On Wed, Nov 12, 2014 at 12:10:39PM +0100, Arturo Borrero Gonzalez wrote:
> This patch fixes some sparse warnings:
>
> net/netfilter/nft_redir.c:39:26: sparse: incorrect type in assignment (different base types)
> net/netfilter/nft_redir.c:39:26: expected unsigned int [unsigned] [usertype] nla_be32
> net/netfilter/nft_redir.c:39:26: got restricted __be32
> net/netfilter/nft_redir.c:40:40: sparse: cast to restricted __be32
> net/netfilter/nft_redir.c:40:40: sparse: cast to restricted __be32
> net/netfilter/nft_redir.c:40:40: sparse: cast to restricted __be32
> net/netfilter/nft_redir.c:40:40: sparse: cast to restricted __be32
> net/netfilter/nft_redir.c:40:40: sparse: cast to restricted __be32
> net/netfilter/nft_redir.c:40:40: sparse: cast to restricted __be32
> net/netfilter/nft_redir.c:46:34: sparse: incorrect type in assignment (different base types)
> net/netfilter/nft_redir.c:46:34: expected unsigned int [unsigned] [usertype] nla_be32
> net/netfilter/nft_redir.c:46:34: got restricted __be32
> net/netfilter/nft_redir.c:47:48: sparse: cast to restricted __be32
> net/netfilter/nft_redir.c:47:48: sparse: cast to restricted __be32
> net/netfilter/nft_redir.c:47:48: sparse: cast to restricted __be32
> net/netfilter/nft_redir.c:47:48: sparse: cast to restricted __be32
> net/netfilter/nft_redir.c:47:48: sparse: cast to restricted __be32
> net/netfilter/nft_redir.c:47:48: sparse: cast to restricted __be32
>
> Reported-by: kbuild test robot <fengguang.wu@intel.com>
> Signed-off-by: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
> ---
> net/netfilter/nft_redir.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/netfilter/nft_redir.c b/net/netfilter/nft_redir.c
> index e27b4e3..dd2aa78 100644
> --- a/net/netfilter/nft_redir.c
> +++ b/net/netfilter/nft_redir.c
> @@ -28,7 +28,7 @@ int nft_redir_init(const struct nft_ctx *ctx,
> const struct nlattr * const tb[])
> {
> struct nft_redir *priv = nft_expr_priv(expr);
> - u32 nla_be32;
> + __be32 nla_be32;
Thanks Arturo.
I already sent a patch, I prefer to get rid of this variable for
consistency with other nft nat-like expressions.
next prev parent reply other threads:[~2014-11-12 11:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-12 11:10 [PATCH] netfilter: nft_redir: fix sparse warnings: cast to restricted __be32 Arturo Borrero Gonzalez
2014-11-12 11:56 ` Pablo Neira Ayuso [this message]
2014-11-12 12:01 ` Arturo Borrero Gonzalez
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=20141112115651.GA32330@salvia \
--to=pablo@netfilter.org \
--cc=arturo.borrero.glez@gmail.com \
--cc=netfilter-devel@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.