linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* net/netfilter/nft_osf.c:97:47: sparse: sparse: incorrect type in argument 3 (different base types)
@ 2021-11-17  1:29 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-11-17  1:29 UTC (permalink / raw)
  To: Luc Van Oostenryck
  Cc: kbuild-all, linux-kernel, Andrew Morton, Linux Memory Management List

[-- Attachment #1: Type: text/plain, Size: 3519 bytes --]

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@intel.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@riseup.net>
:::::: CC: Pablo Neira Ayuso <pablo@netfilter.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 36397 bytes --]

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

* net/netfilter/nft_osf.c:97:47: sparse: sparse: incorrect type in argument 3 (different base types)
@ 2021-11-17 14:37 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-11-17 14:37 UTC (permalink / raw)
  To: Luc Van Oostenryck
  Cc: kbuild-all, linux-kernel, Andrew Morton, Linux Memory Management List

[-- Attachment #1: Type: text/plain, Size: 3519 bytes --]

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@intel.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@riseup.net>
:::::: CC: Pablo Neira Ayuso <pablo@netfilter.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 36397 bytes --]

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

end of thread, other threads:[~2021-11-17 14:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-17  1:29 net/netfilter/nft_osf.c:97:47: sparse: sparse: incorrect type in argument 3 (different base types) kernel test robot
2021-11-17 14:37 kernel test robot

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).