[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202111172230.0LLaJhAb-lkp@intel.com>
Date: Wed, 17 Nov 2021 22:37:41 +0800
From: kernel test robot <lkp@...el.com>
To: Luc Van Oostenryck <luc.vanoostenryck@...il.com>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>,
Linux Memory Management List <linux-mm@...ck.org>
Subject: net/netfilter/nft_osf.c:97:47: sparse: sparse: incorrect type in
argument 3 (different base types)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 8ab774587903771821b59471cc723bba6d893942
commit: d991bb1c8da842a2a0b9dc83b1005e655783f861 include/linux/compiler-gcc.h: sparse can do constant folding of __builtin_bswap*()
date: 7 months ago
config: i386-randconfig-s031-20211116 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.4-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d991bb1c8da842a2a0b9dc83b1005e655783f861
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout d991bb1c8da842a2a0b9dc83b1005e655783f861
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
sparse warnings: (new ones prefixed by >>)
net/netfilter/nft_osf.c:97:47: sparse: sparse: cast to restricted __be32
>> net/netfilter/nft_osf.c:97:47: sparse: sparse: incorrect type in argument 3 (different base types) @@ expected restricted __be32 [usertype] value @@ got unsigned int [usertype] @@
net/netfilter/nft_osf.c:97:47: sparse: expected restricted __be32 [usertype] value
net/netfilter/nft_osf.c:97:47: sparse: got unsigned int [usertype]
vim +97 net/netfilter/nft_osf.c
b96af92d6eaf9f Fernando Fernandez Mancera 2018-07-25 89
b96af92d6eaf9f Fernando Fernandez Mancera 2018-07-25 90 static int nft_osf_dump(struct sk_buff *skb, const struct nft_expr *expr)
b96af92d6eaf9f Fernando Fernandez Mancera 2018-07-25 91 {
b96af92d6eaf9f Fernando Fernandez Mancera 2018-07-25 92 const struct nft_osf *priv = nft_expr_priv(expr);
b96af92d6eaf9f Fernando Fernandez Mancera 2018-07-25 93
a218dc82f0b5c6 Fernando Fernandez Mancera 2018-10-10 94 if (nla_put_u8(skb, NFTA_OSF_TTL, priv->ttl))
a218dc82f0b5c6 Fernando Fernandez Mancera 2018-10-10 95 goto nla_put_failure;
a218dc82f0b5c6 Fernando Fernandez Mancera 2018-10-10 96
22c7652cdaa8cd Fernando Fernandez Mancera 2019-03-27 @97 if (nla_put_be32(skb, NFTA_OSF_FLAGS, ntohl(priv->flags)))
22c7652cdaa8cd Fernando Fernandez Mancera 2019-03-27 98 goto nla_put_failure;
22c7652cdaa8cd Fernando Fernandez Mancera 2019-03-27 99
b96af92d6eaf9f Fernando Fernandez Mancera 2018-07-25 100 if (nft_dump_register(skb, NFTA_OSF_DREG, priv->dreg))
b96af92d6eaf9f Fernando Fernandez Mancera 2018-07-25 101 goto nla_put_failure;
b96af92d6eaf9f Fernando Fernandez Mancera 2018-07-25 102
b96af92d6eaf9f Fernando Fernandez Mancera 2018-07-25 103 return 0;
b96af92d6eaf9f Fernando Fernandez Mancera 2018-07-25 104
b96af92d6eaf9f Fernando Fernandez Mancera 2018-07-25 105 nla_put_failure:
b96af92d6eaf9f Fernando Fernandez Mancera 2018-07-25 106 return -1;
b96af92d6eaf9f Fernando Fernandez Mancera 2018-07-25 107 }
b96af92d6eaf9f Fernando Fernandez Mancera 2018-07-25 108
:::::: The code at line 97 was first introduced by commit
:::::: 22c7652cdaa8cd33ce78bacceb4e826a3f795873 netfilter: nft_osf: Add version option support
:::::: TO: Fernando Fernandez Mancera <ffmancera@...eup.net>
:::::: CC: Pablo Neira Ayuso <pablo@...filter.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Download attachment ".config.gz" of type "application/gzip" (36397 bytes)
Powered by blists - more mailing lists