linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>,
	Linux Memory Management List <linux-mm@kvack.org>
Subject: net/netfilter/nft_osf.c:97:47: sparse: sparse: incorrect type in argument 3 (different base types)
Date: Wed, 17 Nov 2021 09:29:39 +0800	[thread overview]
Message-ID: <202111170928.LEttBhM4-lkp@intel.com> (raw)

[-- 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 --]

             reply	other threads:[~2021-11-17  1:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-17  1:29 kernel test robot [this message]
2021-11-17 14:37 net/netfilter/nft_osf.c:97:47: sparse: sparse: incorrect type in argument 3 (different base types) kernel test robot

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=202111170928.LEttBhM4-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=luc.vanoostenryck@gmail.com \
    /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 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).