[PATCH] netfilter: nft_redir: fix sparse warnings: cast to restricted __be32

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
Signed-off-by: Arturo Borrero Gonzalez <arturo.borrero.glez@xxxxxxxxx>
---
 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;
 	int err;
 
 	err = nft_chain_validate_dependency(ctx->chain, NFT_CHAIN_T_NAT);

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux