[netfilter-nf:under-review 14/18] net/netfilter/nft_set_pipapo.c:2122: warning: expecting prototype for __nft_pipapo_walk(). Prototype was for nft_pipapo_do_walk() instead

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf.git under-review
head:   7ab960ad3bd958ddbeabe9ab2287ac5d0a673f23
commit: cd491237776df450e99904b9408bfad35366a73f [14/18] netfilter: nft_set_pipapo: prepare walk function for on-demand clone
config: sh-allmodconfig (https://download.01.org/0day-ci/archive/20240503/202405031522.nDHvTzEz-lkp@xxxxxxxxx/config)
compiler: sh4-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240503/202405031522.nDHvTzEz-lkp@xxxxxxxxx/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
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202405031522.nDHvTzEz-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

>> net/netfilter/nft_set_pipapo.c:2122: warning: expecting prototype for __nft_pipapo_walk(). Prototype was for nft_pipapo_do_walk() instead


vim +2122 net/netfilter/nft_set_pipapo.c

3c4287f62044a90 Stefano Brivio    2020-01-22  2107  
3c4287f62044a90 Stefano Brivio    2020-01-22  2108  /**
cd491237776df45 Florian Westphal  2024-04-25  2109   * __nft_pipapo_walk() - Walk over elements in m
3c4287f62044a90 Stefano Brivio    2020-01-22  2110   * @ctx:	nftables API context
3c4287f62044a90 Stefano Brivio    2020-01-22  2111   * @set:	nftables API set representation
cd491237776df45 Florian Westphal  2024-04-25  2112   * @m:		matching data pointing to key mapping array
3c4287f62044a90 Stefano Brivio    2020-01-22  2113   * @iter:	Iterator
3c4287f62044a90 Stefano Brivio    2020-01-22  2114   *
3c4287f62044a90 Stefano Brivio    2020-01-22  2115   * As elements are referenced in the mapping array for the last field, directly
3c4287f62044a90 Stefano Brivio    2020-01-22  2116   * scan that array: there's no need to follow rule mappings from the first
cd491237776df45 Florian Westphal  2024-04-25  2117   * field. @m is protected either by RCU read lock or by transaction mutex.
3c4287f62044a90 Stefano Brivio    2020-01-22  2118   */
cd491237776df45 Florian Westphal  2024-04-25  2119  static void nft_pipapo_do_walk(const struct nft_ctx *ctx, struct nft_set *set,
cd491237776df45 Florian Westphal  2024-04-25  2120  			       const struct nft_pipapo_match *m,
3c4287f62044a90 Stefano Brivio    2020-01-22  2121  			       struct nft_set_iter *iter)
3c4287f62044a90 Stefano Brivio    2020-01-22 @2122  {
f04df573faf90bb Florian Westphal  2024-02-13  2123  	const struct nft_pipapo_field *f;
aac14d516c2b575 Florian Westphal  2024-02-13  2124  	unsigned int i, r;
3c4287f62044a90 Stefano Brivio    2020-01-22  2125  
3c4287f62044a90 Stefano Brivio    2020-01-22  2126  	for (i = 0, f = m->f; i < m->field_count - 1; i++, f++)
3c4287f62044a90 Stefano Brivio    2020-01-22  2127  		;
3c4287f62044a90 Stefano Brivio    2020-01-22  2128  
3c4287f62044a90 Stefano Brivio    2020-01-22  2129  	for (r = 0; r < f->rules; r++) {
3c4287f62044a90 Stefano Brivio    2020-01-22  2130  		struct nft_pipapo_elem *e;
3c4287f62044a90 Stefano Brivio    2020-01-22  2131  
3c4287f62044a90 Stefano Brivio    2020-01-22  2132  		if (r < f->rules - 1 && f->mt[r + 1].e == f->mt[r].e)
3c4287f62044a90 Stefano Brivio    2020-01-22  2133  			continue;
3c4287f62044a90 Stefano Brivio    2020-01-22  2134  
3c4287f62044a90 Stefano Brivio    2020-01-22  2135  		if (iter->count < iter->skip)
3c4287f62044a90 Stefano Brivio    2020-01-22  2136  			goto cont;
3c4287f62044a90 Stefano Brivio    2020-01-22  2137  
3c4287f62044a90 Stefano Brivio    2020-01-22  2138  		e = f->mt[r].e;
3c4287f62044a90 Stefano Brivio    2020-01-22  2139  
0e1ea651c9717dd Pablo Neira Ayuso 2023-10-16  2140  		iter->err = iter->fn(ctx, set, iter, &e->priv);
3c4287f62044a90 Stefano Brivio    2020-01-22  2141  		if (iter->err < 0)
cd491237776df45 Florian Westphal  2024-04-25  2142  			return;
3c4287f62044a90 Stefano Brivio    2020-01-22  2143  
3c4287f62044a90 Stefano Brivio    2020-01-22  2144  cont:
3c4287f62044a90 Stefano Brivio    2020-01-22  2145  		iter->count++;
3c4287f62044a90 Stefano Brivio    2020-01-22  2146  	}
cd491237776df45 Florian Westphal  2024-04-25  2147  }
3c4287f62044a90 Stefano Brivio    2020-01-22  2148  

:::::: The code at line 2122 was first introduced by commit
:::::: 3c4287f62044a90e73a561aa05fc46e62da173da nf_tables: Add set type for arbitrary concatenation of ranges

:::::: TO: Stefano Brivio <sbrivio@xxxxxxxxxx>
:::::: CC: Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx>

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




[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux