All of lore.kernel.org
 help / color / mirror / Atom feed
* net/netfilter/ipset/ip_set_hash_ipportnet.c:141:25: sparse: sparse: cast to non-scalar
@ 2026-10-30 15:36 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-10-30 15:36 UTC (permalink / raw)
  To: Florian Westphal; +Cc: oe-kbuild-all, linux-kernel, Pablo Neira Ayuso

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   d89e1d186ec9271bf78e62771779e9fc03bf0fc3
commit: e80456d79ec83b00a6bd44c377684b1632ccc3c7 netfilter: ipset: remove need to allocate memory on delete operations
date:   2 months ago
config: alpha-randconfig-r2311-20261030 (https://download.01.org/0day-ci/archive/20261030/202610301616.CMLXGsZd-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 8.5.0
sparse: v0.6.5-rc1-1-gc4640450
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261030/202610301616.CMLXGsZd-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Fixes: e80456d79ec8 ("netfilter: ipset: remove need to allocate memory on delete operations")
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202610301616.CMLXGsZd-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
   net/netfilter/ipset/ip_set_hash_ipportnet.c: note: in included file:
   net/netfilter/ipset/ip_set_hash_gen.h:368:22: sparse: sparse: cast to non-scalar
   net/netfilter/ipset/ip_set_hash_gen.h:368:22: sparse: sparse: cast from non-scalar
   net/netfilter/ipset/ip_set_hash_gen.h:440:22: sparse: sparse: cast to non-scalar
   net/netfilter/ipset/ip_set_hash_gen.h:440:22: sparse: sparse: cast from non-scalar
   net/netfilter/ipset/ip_set_hash_gen.h:460:22: sparse: sparse: cast to non-scalar
   net/netfilter/ipset/ip_set_hash_gen.h:460:22: sparse: sparse: cast from non-scalar
   net/netfilter/ipset/ip_set_hash_gen.h:1333:40: sparse: sparse: cast to non-scalar
   net/netfilter/ipset/ip_set_hash_gen.h:1333:40: sparse: sparse: cast from non-scalar
>> net/netfilter/ipset/ip_set_hash_ipportnet.c:141:25: sparse: sparse: cast to non-scalar
>> net/netfilter/ipset/ip_set_hash_ipportnet.c:141:25: sparse: sparse: cast from non-scalar
   net/netfilter/ipset/ip_set_hash_ipportnet.c: note: in included file:
   net/netfilter/ipset/ip_set_hash_gen.h:368:22: sparse: sparse: cast to non-scalar
   net/netfilter/ipset/ip_set_hash_gen.h:368:22: sparse: sparse: cast from non-scalar
   net/netfilter/ipset/ip_set_hash_gen.h:440:22: sparse: sparse: cast to non-scalar
   net/netfilter/ipset/ip_set_hash_gen.h:440:22: sparse: sparse: cast from non-scalar
   net/netfilter/ipset/ip_set_hash_gen.h:460:22: sparse: sparse: cast to non-scalar
   net/netfilter/ipset/ip_set_hash_gen.h:460:22: sparse: sparse: cast from non-scalar
   net/netfilter/ipset/ip_set_hash_gen.h:1333:40: sparse: sparse: cast to non-scalar
   net/netfilter/ipset/ip_set_hash_gen.h:1333:40: sparse: sparse: cast from non-scalar
   net/netfilter/ipset/ip_set_hash_ipportnet.c:401:25: sparse: sparse: cast to non-scalar
   net/netfilter/ipset/ip_set_hash_ipportnet.c:401:25: sparse: sparse: cast from non-scalar
--
   net/netfilter/ipset/ip_set_hash_netnet.c: note: in included file:
   net/netfilter/ipset/ip_set_hash_gen.h:368:22: sparse: sparse: cast to non-scalar
   net/netfilter/ipset/ip_set_hash_gen.h:368:22: sparse: sparse: cast from non-scalar
   net/netfilter/ipset/ip_set_hash_gen.h:440:22: sparse: sparse: cast to non-scalar
   net/netfilter/ipset/ip_set_hash_gen.h:440:22: sparse: sparse: cast from non-scalar
   net/netfilter/ipset/ip_set_hash_gen.h:460:22: sparse: sparse: cast to non-scalar
   net/netfilter/ipset/ip_set_hash_gen.h:460:22: sparse: sparse: cast from non-scalar
   net/netfilter/ipset/ip_set_hash_gen.h:1333:40: sparse: sparse: cast to non-scalar
   net/netfilter/ipset/ip_set_hash_gen.h:1333:40: sparse: sparse: cast from non-scalar
   net/netfilter/ipset/ip_set_hash_gen.h:1341:48: sparse: sparse: cast to non-scalar
   net/netfilter/ipset/ip_set_hash_gen.h:1341:48: sparse: sparse: cast from non-scalar
>> net/netfilter/ipset/ip_set_hash_netnet.c:153:21: sparse: sparse: cast to non-scalar
>> net/netfilter/ipset/ip_set_hash_netnet.c:153:21: sparse: sparse: cast from non-scalar
   net/netfilter/ipset/ip_set_hash_netnet.c:154:21: sparse: sparse: cast to non-scalar
   net/netfilter/ipset/ip_set_hash_netnet.c:154:21: sparse: sparse: cast from non-scalar
   net/netfilter/ipset/ip_set_hash_netnet.c: note: in included file:
   net/netfilter/ipset/ip_set_hash_gen.h:368:22: sparse: sparse: cast to non-scalar
   net/netfilter/ipset/ip_set_hash_gen.h:368:22: sparse: sparse: cast from non-scalar
   net/netfilter/ipset/ip_set_hash_gen.h:440:22: sparse: sparse: cast to non-scalar
   net/netfilter/ipset/ip_set_hash_gen.h:440:22: sparse: sparse: cast from non-scalar
   net/netfilter/ipset/ip_set_hash_gen.h:460:22: sparse: sparse: cast to non-scalar
   net/netfilter/ipset/ip_set_hash_gen.h:460:22: sparse: sparse: cast from non-scalar
   net/netfilter/ipset/ip_set_hash_gen.h:1333:40: sparse: sparse: cast to non-scalar
   net/netfilter/ipset/ip_set_hash_gen.h:1333:40: sparse: sparse: cast from non-scalar
   net/netfilter/ipset/ip_set_hash_gen.h:1341:48: sparse: sparse: cast to non-scalar
   net/netfilter/ipset/ip_set_hash_gen.h:1341:48: sparse: sparse: cast from non-scalar
   net/netfilter/ipset/ip_set_hash_netnet.c:394:21: sparse: sparse: cast to non-scalar
   net/netfilter/ipset/ip_set_hash_netnet.c:394:21: sparse: sparse: cast from non-scalar
   net/netfilter/ipset/ip_set_hash_netnet.c:395:21: sparse: sparse: cast to non-scalar
   net/netfilter/ipset/ip_set_hash_netnet.c:395:21: sparse: sparse: cast from non-scalar

vim +141 net/netfilter/ipset/ip_set_hash_ipportnet.c

3d14b171f004f75 Jozsef Kadlecsik 2011-06-16  132  
41d22f7b2e48c77 Jozsef Kadlecsik 2011-02-01  133  static int
41d22f7b2e48c77 Jozsef Kadlecsik 2011-02-01  134  hash_ipportnet4_kadt(struct ip_set *set, const struct sk_buff *skb,
b66554cf03fe866 Jozsef Kadlecsik 2011-06-16  135  		     const struct xt_action_param *par,
5d50e1d88336a93 Jozsef Kadlecsik 2013-04-08  136  		     enum ipset_adt adt, struct ip_set_adt_opt *opt)
41d22f7b2e48c77 Jozsef Kadlecsik 2011-02-01  137  {
21956ab290f7f3f Jozsef Kadlecsik 2015-06-26  138  	const struct hash_ipportnet4 *h = set->data;
41d22f7b2e48c77 Jozsef Kadlecsik 2011-02-01  139  	ipset_adtfn adtfn = set->variant->adt[adt];
5d50e1d88336a93 Jozsef Kadlecsik 2013-04-08  140  	struct hash_ipportnet4_elem e = {
8e5fd2a55e2468f Jozsef Kadlecsik 2026-07-30 @141  		.cidr = INIT_CIDR(h->rnets[0], HOST_MASK),
9b03a5ef49c0151 Jozsef Kadlecsik 2011-06-16  142  	};
ca134ce86451f3f Jozsef Kadlecsik 2013-09-07  143  	struct ip_set_ext ext = IP_SET_INIT_KEXT(skb, opt, set);
41d22f7b2e48c77 Jozsef Kadlecsik 2011-02-01  144  
41d22f7b2e48c77 Jozsef Kadlecsik 2011-02-01  145  	if (adt == IPSET_TEST)
5d50e1d88336a93 Jozsef Kadlecsik 2013-04-08  146  		e.cidr = HOST_MASK - 1;
41d22f7b2e48c77 Jozsef Kadlecsik 2011-02-01  147  
ac8cc925d35fc5a Jozsef Kadlecsik 2011-06-16  148  	if (!ip_set_get_ip4_port(skb, opt->flags & IPSET_DIM_TWO_SRC,
5d50e1d88336a93 Jozsef Kadlecsik 2013-04-08  149  				 &e.port, &e.proto))
41d22f7b2e48c77 Jozsef Kadlecsik 2011-02-01  150  		return -EINVAL;
41d22f7b2e48c77 Jozsef Kadlecsik 2011-02-01  151  
5d50e1d88336a93 Jozsef Kadlecsik 2013-04-08  152  	ip4addrptr(skb, opt->flags & IPSET_DIM_ONE_SRC, &e.ip);
5d50e1d88336a93 Jozsef Kadlecsik 2013-04-08  153  	ip4addrptr(skb, opt->flags & IPSET_DIM_THREE_SRC, &e.ip2);
5d50e1d88336a93 Jozsef Kadlecsik 2013-04-08  154  	e.ip2 &= ip_set_netmask(e.cidr + 1);
41d22f7b2e48c77 Jozsef Kadlecsik 2011-02-01  155  
5d50e1d88336a93 Jozsef Kadlecsik 2013-04-08  156  	return adtfn(set, &e, &ext, &opt->ext, opt->cmdflags);
41d22f7b2e48c77 Jozsef Kadlecsik 2011-02-01  157  }
41d22f7b2e48c77 Jozsef Kadlecsik 2011-02-01  158  

:::::: The code at line 141 was first introduced by commit
:::::: 8e5fd2a55e2468f6225ef5af01ae58cdbcbae8cf netfilter: ipset: rework cidr bookkeeping

:::::: TO: Jozsef Kadlecsik <kadlec@netfilter.org>
:::::: CC: Pablo Neira Ayuso <pablo@netfilter.org>

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-10-30 15:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-30 15:36 net/netfilter/ipset/ip_set_hash_ipportnet.c:141:25: sparse: sparse: cast to non-scalar kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.