Re: [PATCH v4 1/8] net: Remove the now superfluous sentinel elements from ctl_table array

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

 



On Thu, 25 Apr 2024 14:02:59 +0200 Joel Granados via B4 Relay wrote:
> -	for (i = 0; i < ARRAY_SIZE(mpls_table) - 1; i++)
> +	for (i = 0; i < tabel_size; i++)
>  		table[i].data = (char *)net + (uintptr_t)table[i].data;
>  
>  	net->mpls.ctl = register_net_sysctl_sz(net, "net/mpls", table,
> -					       ARRAY_SIZE(mpls_table));
> +					       tabel_size);

../net/mpls/af_mpls.c: In function ‘mpls_net_init’:
../net/mpls/af_mpls.c:2676:25: error: ‘tabel_size’ undeclared (first use in this function); did you mean ‘table_size’?
 2676 |         for (i = 0; i < tabel_size; i++)
      |                         ^~~~~~~~~~
      |                         table_size
../net/mpls/af_mpls.c:2676:25: note: each undeclared identifier is reported only once for each function it appears in
../net/mpls/af_mpls.c:2660:16: warning: unused variable ‘table_size’ [-Wunused-variable]
 2660 |         size_t table_size = ARRAY_SIZE(mpls_table);
      |                ^~~~~~~~~~
-- 
netdev FAQ tl;dr:
 - designate your patch to a tree - [PATCH net] or [PATCH net-next]
 - for fixes the Fixes: tag is required, regardless of the tree
 - don't post large series (> 15 patches), break them up
 - don't repost your patches within one 24h period

pw-bot: cr





[Index of Archives]     [Netdev]     [AoE Tools]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux