netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] netfilter: nft_osf: use enum nft_data_types for nft_validate_register_store
@ 2018-09-18  5:21 Stefan Agner
  2018-09-20 16:24 ` Pablo Neira Ayuso
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Agner @ 2018-09-18  5:21 UTC (permalink / raw)
  To: ffmancera, pablo, kadlec, fw, davem
  Cc: netfilter-devel, coreteam, netdev, linux-kernel, Stefan Agner

The function nft_validate_register_store requires a struct of type
struct nft_data_types. NFTA_DATA_VALUE is of type enum
nft_verdict_attributes. Pass the correct enum type.

This fixes a warning seen with Clang:
  net/netfilter/nft_osf.c:52:8: warning: implicit conversion from
    enumeration type 'enum nft_data_attributes' to different enumeration
    type 'enum nft_data_types' [-Wenum-conversion]
                                          NFTA_DATA_VALUE, NFT_OSF_MAXGENRELEN);
                                          ^~~~~~~~~~~~~~~

Link: https://github.com/ClangBuiltLinux/linux/issues/103
Signed-off-by: Stefan Agner <stefan@agner.ch>
---
 net/netfilter/nft_osf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/netfilter/nft_osf.c b/net/netfilter/nft_osf.c
index 5af74b37f423..a35fb59ace73 100644
--- a/net/netfilter/nft_osf.c
+++ b/net/netfilter/nft_osf.c
@@ -49,7 +49,7 @@ static int nft_osf_init(const struct nft_ctx *ctx,
 
 	priv->dreg = nft_parse_register(tb[NFTA_OSF_DREG]);
 	err = nft_validate_register_store(ctx, priv->dreg, NULL,
-					  NFTA_DATA_VALUE, NFT_OSF_MAXGENRELEN);
+					  NFT_DATA_VALUE, NFT_OSF_MAXGENRELEN);
 	if (err < 0)
 		return err;
 
-- 
2.19.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] netfilter: nft_osf: use enum nft_data_types for nft_validate_register_store
  2018-09-18  5:21 [PATCH] netfilter: nft_osf: use enum nft_data_types for nft_validate_register_store Stefan Agner
@ 2018-09-20 16:24 ` Pablo Neira Ayuso
  0 siblings, 0 replies; 2+ messages in thread
From: Pablo Neira Ayuso @ 2018-09-20 16:24 UTC (permalink / raw)
  To: Stefan Agner
  Cc: ffmancera, kadlec, fw, davem, netfilter-devel, coreteam, netdev,
	linux-kernel

On Mon, Sep 17, 2018 at 10:21:36PM -0700, Stefan Agner wrote:
> The function nft_validate_register_store requires a struct of type
> struct nft_data_types. NFTA_DATA_VALUE is of type enum
> nft_verdict_attributes. Pass the correct enum type.

Applied, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-09-20 16:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-18  5:21 [PATCH] netfilter: nft_osf: use enum nft_data_types for nft_validate_register_store Stefan Agner
2018-09-20 16:24 ` Pablo Neira Ayuso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).