Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp1225690lqa; Mon, 29 Apr 2024 01:54:21 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV6QUx0X0GlfZNqKrzXxTQquchTxUYq16HOgp+Q2VqVHNvveT0Yf1+5+txPGgimT51xbzmte7QWK96yM/nkP4/AWPVyVL24u6FHmG8cXw== X-Google-Smtp-Source: AGHT+IEg51aLEaynVAsC8YpKwM6YexNFQosBUsNCzavSB1pN3fSJDqLdxoGfBNgdaQbycwypV3Ym X-Received: by 2002:a05:6359:1904:b0:18b:699c:1645 with SMTP id mf4-20020a056359190400b0018b699c1645mr8945679rwb.30.1714380861302; Mon, 29 Apr 2024 01:54:21 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714380861; cv=pass; d=google.com; s=arc-20160816; b=ZDw7Rbpv1qqBSbXG35ean5/2BZEq3SgbQfgZsO4jT6rPtyJ4l3Ihq2MqaYbMvAY0u9 ZQZRlDMbQfZl2KaFb+D3enFHtMbFsxpu73JAdd9vCg+pJkiDHO41pXMcfFuI1YpU4/iJ Qyz7hFgRm9llttVJJAqSAN0qjbG9AjQMiJGyTg+fbOxrdnwrpWsOuOMGVJK7d3FzUcKP MSVxBLsKO1zNWS/1KqZuLDC8V9R3XWVL/iJTbnxQDDJI+q1xiyPt9jFEHv0KPHr5XHGr uk+4ntnr/GZyOsvRu2CMJ84sjnJ6oiy/cWLtrzc7kYD5cK8Os/Pevs3txaqHfU5M4eA0 zxGg== 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=B8/XiwufZ6t8V+HNDXd9kAHgIOVvlAQ1kkvCJVkoKH4=; fh=Pi5nHXkuD3Aq+FdKF6MeMQdtUS8xN9k5148wNBge2xs=; b=PysxcSFigYBeYkmigv/DcWyw3K5kzxl1FAL28kzkm6eIEytoMOW2eLwXQ9d6qCtkk0 HEWmVPaTM+/3L3xsaPBlxh3ltVORvl8C3NIyq8NFixWn8CKIH1JVegZEQgBpuAhMkWZS mDpO1y+xmMuarE/JYOIApw59ie5mafbocO6pRyHgfuEx/Y9G2kg/VndO3s5gL0OAhZKA Wh5H13lp9OdTnQNqOUq/uvx1LNu2gtr390vxI/kttYIUcdDcNnFq89QWJflCMuPCcnxe G/YyXz94vxWavRj63cAJ6bcoHxCW2ZsDA91ypWUIlM/c9HEoOXGPgVIoSFMsvM0go/Gl ARFw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-nfs+bounces-3046-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-nfs+bounces-3046-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id u14-20020a05622a010e00b0043acbae5290si3169629qtw.275.2024.04.29.01.54.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Apr 2024 01:54:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs+bounces-3046-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-nfs+bounces-3046-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-nfs+bounces-3046-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 0AB501C20DC9 for ; Mon, 29 Apr 2024 08:54:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CF8D21B809; Mon, 29 Apr 2024 08:54:11 +0000 (UTC) X-Original-To: linux-nfs@vger.kernel.org Received: from us-smtp-delivery-44.mimecast.com (us-smtp-delivery-44.mimecast.com [207.211.30.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 6607017C69 for ; Mon, 29 Apr 2024 08:54:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=207.211.30.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714380851; cv=none; b=Q6KRmtq13ZWrsyCHakSxltU4JZirKafyFKcfPI+uUBzk9V3blDVlKXeXg8PJhHavg7Mi7olxZ8yyXV8yZtqW5xxz2G8KwwjNIVVf36EJ3tcaQJwZNRx0QCLFqg2ege1qGFnKytg75rp/31aHPRZiQzTIyoLQWpo1qJrwt6RNkdw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714380851; c=relaxed/simple; bh=15p9jTZ2hEXQyesHe8ZLvFtpZ8Mfmfy/0ZKJ3CCg11M=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: In-Reply-To:Content-Type:Content-Disposition; b=Dt94Ag1irkNJGK7Q6OUbeDIBSQdUNV3J8Y0ZDOsT0URrp0nfN21bHQVXo4c2GHwfkzrtw0GuJLzBPYyQxxfwbY1JaaDz+6Pf/ZLRR4TbYVCDL2/NBejsZIq/ll7FFE9WKiyg3c/8LhjLAvzivHoVKK2QaQ5YVU3jPJjrOlga8rY= 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=207.211.30.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 (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-515-rVXMo5ZLPx-cd8GI79VPfQ-1; Mon, 29 Apr 2024 04:53:59 -0400 X-MC-Unique: rVXMo5ZLPx-cd8GI79VPfQ-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (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 9E4713806704; Mon, 29 Apr 2024 08:53:58 +0000 (UTC) Received: from hog (unknown [10.39.193.137]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B198740BB4E; Mon, 29 Apr 2024 08:53:48 +0000 (UTC) Date: Mon, 29 Apr 2024 10:53:47 +0200 From: Sabrina Dubroca To: j.granados@samsung.com 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> Precedence: bulk X-Mailing-List: linux-nfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In-Reply-To: <20240426-jag-sysctl_remset_net-v5-1-e3b12f6111a6@samsung.com> X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.9 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-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(struct n= et *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; Some coding style nits in case you re-post: > +=09=09for (int i =3D 0; i < table_size; ++i) move the declaration of int i out of the for (), it's almost never written this way (at least in networking) > +=09=09=09(tbl + i)->data +=3D (char *)net - (char *)&init_net; tbl[i].data =3D ... is more in line with other similar functions in the rest of net/ [...] > 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); This table still has a {} as its final element. It should be gone too? --=20 Sabrina