Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp1411122lqa; Mon, 29 Apr 2024 07:49:54 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXKLIuAJWDtijkOkFI6dZ9q58xpljVtDS6c9JMaS5DXCkgHvV0CyhLt4OzW0CrmZGG66LF6JSDCAkpKJHP4BhOv+TFd/y8RpalYxeh5HA== X-Google-Smtp-Source: AGHT+IGf+ltjAH/qtLlJaqa+3LgP1/oroqxIF8NLXYqSv5c/4T41/KduXqmmsj1fiiNZgSpEaucr X-Received: by 2002:a17:906:470d:b0:a52:5925:2a31 with SMTP id y13-20020a170906470d00b00a5259252a31mr6416972ejq.29.1714402194274; Mon, 29 Apr 2024 07:49:54 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714402194; cv=pass; d=google.com; s=arc-20160816; b=G9pHpCbxPWImVhwz4eeODRUqxbOWYN/1mOeMaKGiqXGq85gRbcPAcexb4WQGDI9MUW jjIB/+gOWTp9znGpQzY5saJ92iud5mAmuIeUEGPj2y89LsydxKFI8DaGinEG+dY+0ODn wPRR9LhnlXfvQYite5Z00GY4VUYwWCpLH7m55xbqcFGy83X6AidlQZb2ma+18fcFwDUk PuxhUuvBvJr0ssMKWF99zDGGY5xZV0kz6a9T3Q2jqRIwaTlSmwXFtlmu9bmHkVjQKasZ 43DWK15sdPn1TS50so8jJaL9WOemJR4AzvEmFQoMVgeWqueQwNU0skj0v6LahAT5sMoK IQTQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:content-disposition:in-reply-to :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date; bh=PiP3Rya2njT2EpnM0mLQhiCWg4Bw4Fk7Niq3a554iJk=; fh=zh2p5X1X1G+8SoCr/gyab8W2AwZ1tDbW3XDl0zdgyzw=; b=UcgMwD06UeAUe2M1yXGXxMQDtfOg/TtSOaXM3wK82+NPQ9k+bgSgqeF9FtFHIUIw+b tK/rlYvtOf2ddO2+GeOoWAZ7u9ZYSi0oEHWJt1ez9+XUGDYJaoRtJpcOe1Qmj/QOTtgr +fEejaGCcZickn2NqNGd36+nSriCR1TDH1CFDUzb2o/MHrv1+URgYV+2Xzp40sSOyfH6 JXD6ukLceK/z27rR8Dn1GjRcCFa3QLMhhO2hyWrWQZPfw0UWlLK7fnOIL5AzwNbzIl7t qEkgvn1LwgAQzotXBMgTID+1qFgoXZvUjdyZii7Yc+D4CwrT2gsxd6IHCaEZz/8DLt6D 9HtA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-nfs+bounces-3053-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-nfs+bounces-3053-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id x24-20020a1709060a5800b00a558efb1b50si12132480ejf.510.2024.04.29.07.49.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Apr 2024 07:49:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs+bounces-3053-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-nfs+bounces-3053-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-nfs+bounces-3053-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id E88041F22ADC for ; Mon, 29 Apr 2024 14:49:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3FE8A7EEF3; Mon, 29 Apr 2024 14:49:43 +0000 (UTC) X-Original-To: linux-nfs@vger.kernel.org Received: from us-smtp-delivery-44.mimecast.com (us-smtp-delivery-44.mimecast.com [205.139.111.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CDDD880039 for ; Mon, 29 Apr 2024 14:49:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.139.111.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714402183; cv=none; b=mXrQ24c5KAz1bG3v0XO61A5MIQc/eu+yKhF5wr58cowZZvo/LT90EfLWyLGAFTw62+YmZlUUayld0FqXxxR5P4LBUeDDGBnY4EiTo0s9f7HU5ZPXt1RLipCXicyWeFpBV5Fksu9JsW0JE4//GhA0Ze94cRXRPIokHpzjyzBQ/Z0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714402183; c=relaxed/simple; bh=Pqr7/07Yw2D7SEawMZgXWcnAK3LEd3hoqf3xCtS6wY4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: In-Reply-To:Content-Type:Content-Disposition; b=AgRODlqOolZM0Wzos3yBNjR9SyiLPAgEDFzTYb4Ko/JI1vXaKJYEGtMnEVHt8gIz2hysqwK36v2ycY91A3Nq84iAyBIjkyKAoYIDLtinTMiw61KfR2hTJRU+JUYhlSAUQOJauAq+3tV8jOKo/kO6d2ViBezN+G03ELhGOOkNOLs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=queasysnail.net; spf=none smtp.mailfrom=queasysnail.net; arc=none smtp.client-ip=205.139.111.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=queasysnail.net Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=queasysnail.net Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-34-ZwAzUYwrN5SO0iPVZmvC4A-1; Mon, 29 Apr 2024 10:49:29 -0400 X-MC-Unique: ZwAzUYwrN5SO0iPVZmvC4A-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1116780D678; Mon, 29 Apr 2024 14:49:29 +0000 (UTC) Received: from hog (unknown [10.39.193.137]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AD66D2166B32; Mon, 29 Apr 2024 14:49:19 +0000 (UTC) Date: Mon, 29 Apr 2024 16:49:18 +0200 From: Sabrina Dubroca To: Joel Granados Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Alexander Aring , Stefan Schmidt , Miquel Raynal , David Ahern , Steffen Klassert , Herbert Xu , Matthieu Baerts , Mat Martineau , Geliang Tang , Remi Denis-Courmont , Allison Henderson , David Howells , Marc Dionne , Marcelo Ricardo Leitner , Xin Long , Wenjia Zhang , Jan Karcher , "D. Wythe" , Tony Lu , Wen Gu , Trond Myklebust , Anna Schumaker , Chuck Lever , Jeff Layton , Neil Brown , Olga Kornievskaia , Dai Ngo , Tom Talpey , Jon Maloy , Ying Xue , Martin Schiller , Pablo Neira Ayuso , Jozsef Kadlecsik , Florian Westphal , Roopa Prabhu , Nikolay Aleksandrov , Simon Horman , Julian Anastasov , Joerg Reuter , Luis Chamberlain , Kees Cook , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, dccp@vger.kernel.org, linux-wpan@vger.kernel.org, mptcp@lists.linux.dev, linux-hams@vger.kernel.org, linux-rdma@vger.kernel.org, rds-devel@oss.oracle.com, linux-afs@lists.infradead.org, linux-sctp@vger.kernel.org, linux-s390@vger.kernel.org, linux-nfs@vger.kernel.org, tipc-discussion@lists.sourceforge.net, linux-x25@vger.kernel.org, netfilter-devel@vger.kernel.org, coreteam@netfilter.org, bridge@lists.linux.dev, lvs-devel@vger.kernel.org Subject: Re: [PATCH v5 1/8] net: Remove the now superfluous sentinel elements from ctl_table array Message-ID: References: <20240426-jag-sysctl_remset_net-v5-0-e3b12f6111a6@samsung.com> <20240426-jag-sysctl_remset_net-v5-1-e3b12f6111a6@samsung.com> <20240429123315.og27yehofzz6cui3@joelS2.panther.com> Precedence: bulk X-Mailing-List: linux-nfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In-Reply-To: <20240429123315.og27yehofzz6cui3@joelS2.panther.com> X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.6 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: queasysnail.net Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 2024-04-29, 14:33:15 +0200, Joel Granados wrote: > On Mon, Apr 29, 2024 at 10:53:47AM +0200, Sabrina Dubroca wrote: > > 2024-04-26, 12:46:53 +0200, Joel Granados via B4 Relay wrote: > > > diff --git a/net/core/sysctl_net_core.c b/net/core/sysctl_net_core.c > > > index 6973dda3abda..a84690b13bb9 100644 > > > --- a/net/core/sysctl_net_core.c > > > +++ b/net/core/sysctl_net_core.c > > [...] > > > @@ -723,12 +722,11 @@ static __net_init int sysctl_core_net_init(stru= ct net *net) > > > =09=09if (tbl =3D=3D NULL) > > > =09=09=09goto err_dup; > > > =20 > > > -=09=09for (tmp =3D tbl; tmp->procname; tmp++) > > > -=09=09=09tmp->data +=3D (char *)net - (char *)&init_net; > >=20 > > Some coding style nits in case you re-post: > Thx. I will, so please scream if you see more issues. I've gone through the whole series and didn't see anything more. > > > +=09=09for (int i =3D 0; i < table_size; ++i) > >=20 > > move the declaration of int i out of the for (), it's almost never > > written this way (at least in networking) > done >=20 > >=20 > > > +=09=09=09(tbl + i)->data +=3D (char *)net - (char *)&init_net; > >=20 > > tbl[i].data =3D ... > >=20 > > is more in line with other similar functions in the rest of net/ > done >=20 > >=20 > >=20 > > [...] > > > diff --git a/net/mpls/af_mpls.c b/net/mpls/af_mpls.c > > > index 6dab883a08dd..ecc849678e7b 100644 > > > --- a/net/mpls/af_mpls.c > > > +++ b/net/mpls/af_mpls.c > > [...] > > > @@ -2674,6 +2673,7 @@ static const struct ctl_table mpls_table[] =3D = { > > > =20 > > > static int mpls_net_init(struct net *net) > > > { > > > +=09size_t table_size =3D ARRAY_SIZE(mpls_table); > >=20 > > This table still has a {} as its final element. It should be gone too? > Now, how did that get away? I'll run my coccinelle scripts once more to > make sure that I don't have more of these hiding in the shadows. I didn't spot any other with a dumb sed -n ',^};/p' (with file/line produced by git grep 'struct ctl_table' -- net) Thanks. --=20 Sabrina