LVS
lvs-devel
Google
 
Web LinuxVirtualServer.org

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

To: Joel Granados via B4 Relay <devnull+j.granados.samsung.com@xxxxxxxxxx>
Subject: Re: [PATCH v4 1/8] net: Remove the now superfluous sentinel elements from ctl_table array
Cc: j.granados@xxxxxxxxxxx, "David S. Miller" <davem@xxxxxxxxxxxxx>, Eric Dumazet <edumazet@xxxxxxxxxx>, Paolo Abeni <pabeni@xxxxxxxxxx>, Alexander Aring <alex.aring@xxxxxxxxx>, Stefan Schmidt <stefan@xxxxxxxxxxxxxxxxxx>, Miquel Raynal <miquel.raynal@xxxxxxxxxxx>, David Ahern <dsahern@xxxxxxxxxx>, Steffen Klassert <steffen.klassert@xxxxxxxxxxx>, Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>, Matthieu Baerts <matttbe@xxxxxxxxxx>, Mat Martineau <martineau@xxxxxxxxxx>, Geliang Tang <geliang@xxxxxxxxxx>, Ralf Baechle <ralf@xxxxxxxxxxxxxx>, Remi Denis-Courmont <courmisch@xxxxxxxxx>, Allison Henderson <allison.henderson@xxxxxxxxxx>, David Howells <dhowells@xxxxxxxxxx>, Marc Dionne <marc.dionne@xxxxxxxxxxxx>, Marcelo Ricardo Leitner <marcelo.leitner@xxxxxxxxx>, Xin Long <lucien.xin@xxxxxxxxx>, Wenjia Zhang <wenjia@xxxxxxxxxxxxx>, Jan Karcher <jaka@xxxxxxxxxxxxx>, "D. Wythe" <alibuda@xxxxxxxxxxxxxxxxx>, Tony Lu <tonylu@xxxxxxxxxxxxxxxxx>, Wen Gu <guwen@xxxxxxxxxxxxxxxxx>, Trond Myklebust <trond.myklebust@xxxxxxxxxxxxxxx>, Anna Schumaker <anna@xxxxxxxxxx>, Chuck Lever <chuck.lever@xxxxxxxxxx>, Jeff Layton <jlayton@xxxxxxxxxx>, Neil Brown <neilb@xxxxxxx>, Olga Kornievskaia <kolga@xxxxxxxxxx>, Dai Ngo <Dai.Ngo@xxxxxxxxxx>, Tom Talpey <tom@xxxxxxxxxx>, Jon Maloy <jmaloy@xxxxxxxxxx>, Ying Xue <ying.xue@xxxxxxxxxxxxx>, Martin Schiller <ms@xxxxxxxxxx>, Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx>, Jozsef Kadlecsik <kadlec@xxxxxxxxxxxxx>, Florian Westphal <fw@xxxxxxxxx>, Roopa Prabhu <roopa@xxxxxxxxxx>, Nikolay Aleksandrov <razor@xxxxxxxxxxxxx>, Simon Horman <horms@xxxxxxxxxxxx>, Julian Anastasov <ja@xxxxxx>, Joerg Reuter <jreuter@xxxxxxxx>, Luis Chamberlain <mcgrof@xxxxxxxxxx>, Kees Cook <keescook@xxxxxxxxxxxx>, netdev@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, dccp@xxxxxxxxxxxxxxx, linux-wpan@xxxxxxxxxxxxxxx, mptcp@xxxxxxxxxxxxxxx, linux-hams@xxxxxxxxxxxxxxx, linux-rdma@xxxxxxxxxxxxxxx, rds-devel@xxxxxxxxxxxxxx, linux-afs@xxxxxxxxxxxxxxxxxxx, linux-sctp@xxxxxxxxxxxxxxx, linux-s390@xxxxxxxxxxxxxxx, linux-nfs@xxxxxxxxxxxxxxx, tipc-discussion@xxxxxxxxxxxxxxxxxxxxx, linux-x25@xxxxxxxxxxxxxxx, netfilter-devel@xxxxxxxxxxxxxxx, coreteam@xxxxxxxxxxxxx, bridge@xxxxxxxxxxxxxxx, lvs-devel@xxxxxxxxxxxxxxx
From: Jakub Kicinski <kuba@xxxxxxxxxx>
Date: Thu, 25 Apr 2024 15:58:04 -0700
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


<Prev in Thread] Current Thread [Next in Thread>