From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (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 2EF3C16407; Wed, 21 Jun 2023 13:06:23 +0000 (UTC) Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8069AE57; Wed, 21 Jun 2023 06:06:21 -0700 (PDT) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20230621130618euoutp029d7307487d761f7bf2f8f6f0c9e5bc6d~qrmmZaJYP1283412834euoutp024; Wed, 21 Jun 2023 13:06:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20230621130618euoutp029d7307487d761f7bf2f8f6f0c9e5bc6d~qrmmZaJYP1283412834euoutp024 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1687352779; bh=tF4riIzozstFHcZHBtz5SQAzztgzSEi85C6+BMxI57A=; h=Date:From:To:CC:Subject:In-Reply-To:References:From; b=KizIn4h/+VubKpimOPqcdjHWTOSNrdxhq52NIdlcN6uvcXLAB6nFiyBh7t4SmSiCP td604+vg7J45oRN7XVDY0MruktIM6Tfp+rbOoX3PpG3N0t8hckrvJWga2W8NV3jyeY H1l5Lg0B87tZSR6VD/1dW5vkoQMqYyIu+p+NXDVs= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20230621130618eucas1p24a0ecfda837a4bd159368de20c0d1f69~qrml_A2lL0200602006eucas1p2B; Wed, 21 Jun 2023 13:06:18 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id 84.F5.42423.AC5F2946; Wed, 21 Jun 2023 14:06:18 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20230621130617eucas1p2525f138d93e3e4d0385cda670558b863~qrmlJMDn80596505965eucas1p2T; Wed, 21 Jun 2023 13:06:17 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20230621130617eusmtrp157908a4e096267c8ad2bfbaa7ff6b47e~qrmlGGTkZ0857208572eusmtrp1W; Wed, 21 Jun 2023 13:06:17 +0000 (GMT) X-AuditID: cbfec7f2-a51ff7000002a5b7-82-6492f5ca367b Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id F1.B8.14344.9C5F2946; Wed, 21 Jun 2023 14:06:17 +0100 (BST) Received: from CAMSVWEXC02.scsc.local (unknown [106.1.227.72]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20230621130616eusmtip17e21dd5f7eca1289642f50e5db94443d~qrmkf0BdK0234302343eusmtip1d; Wed, 21 Jun 2023 13:06:16 +0000 (GMT) Received: from localhost (106.210.248.248) by CAMSVWEXC02.scsc.local (2002:6a01:e348::6a01:e348) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 21 Jun 2023 14:06:15 +0100 Date: Wed, 21 Jun 2023 15:06:14 +0200 From: Joel Granados To: Jani Nikula CC: , Russell King , Catalin Marinas , Will Deacon , Michael Ellerman , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Gerald Schaefer , Andy Lutomirski , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , , Herbert Xu , "David S. Miller" , Russ Weight , Greg Kroah-Hartman , Phillip Potter , Clemens Ladisch , Arnd Bergmann , Corey Minyard , Theodore Ts'o , "Jason A. Donenfeld" , Joonas Lahtinen , Rodrigo Vivi , Tvrtko Ursulin , David Airlie , Daniel Vetter , "K. Y. Srinivasan" , Haiyang Zhang , Wei Liu , Dexuan Cui , Jason Gunthorpe , Leon Romanovsky , Benjamin Herrenschmidt , Song Liu , Robin Holt , Steve Wahl , David Ahern , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Sudip Mukherjee , Mark Rutland , "James E.J. Bottomley" , "Martin K. Petersen" , Doug Gilbert , Jiri Slaby , Juergen Gross , Stefano Stabellini , Alexander Viro , Christian Brauner , Benjamin LaHaise , David Howells , Jan Harkes , , Trond Myklebust , Anna Schumaker , Chuck Lever , Jeff Layton , Jan Kara , Anton Altaparmakov , Mark Fasheh , Joel Becker , Joseph Qi , Kees Cook , Iurii Zaikin , Eric Biggers , "Darrick J. Wong" , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Balbir Singh , Eric Biederman , "Naveen N. Rao" , Anil S Keshavamurthy , Masami Hiramatsu , Peter Zijlstra , Petr Mladek , Sergey Senozhatsky , Juri Lelli , Vincent Guittot , John Stultz , Steven Rostedt , Andrew Morton , Mike Kravetz , Muchun Song , Naoya Horiguchi , "Matthew Wilcox (Oracle)" , Joerg Reuter , Ralf Baechle , Pablo Neira Ayuso , Jozsef Kadlecsik , Florian Westphal , Roopa Prabhu , Nikolay Aleksandrov , Alexander Aring , Stefan Schmidt , Miquel Raynal , Steffen Klassert , Matthieu Baerts , Mat Martineau , Simon Horman , Julian Anastasov , Remi Denis-Courmont , Santosh Shilimkar , Marc Dionne , Neil Horman , Marcelo Ricardo Leitner , Xin Long , Karsten Graul , Wenjia Zhang , Jan Karcher , Jon Maloy , Ying Xue , Martin Schiller , John Johansen , Paul Moore , James Morris , "Serge E. Hallyn" , Jarkko Sakkinen , Nicholas Piggin , Christophe Leroy , Christian Borntraeger , Sven Schnelle , "H. Peter Anvin" , "Rafael J. Wysocki" , Mike Travis , Oleksandr Tyshchenko , Amir Goldstein , Matthew Bobrowski , John Fastabend , Martin KaFai Lau , Yonghong Song , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Waiman Long , Boqun Feng , John Ogness , Dietmar Eggemann , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Valentin Schneider , Andy Lutomirski , Will Drewry , Stephen Boyd , Miaohe Lin , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: Re: [PATCH 09/11] sysctl: Remove the end element in sysctl table arrays Message-ID: <20230621130614.s36w4u7dzmb5d5p3@localhost> Precedence: bulk X-Mailing-List: bpf@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="avrt2cz7yepdubk6" Content-Disposition: inline In-Reply-To: <87o7l92hg8.fsf@intel.com> X-Originating-IP: [106.210.248.248] X-ClientProxiedBy: CAMSVWEXC01.scsc.local (2002:6a01:e347::6a01:e347) To CAMSVWEXC02.scsc.local (2002:6a01:e348::6a01:e348) X-Brightmail-Tracker: H4sIAAAAAAAAA2VTaUwUZxjuNzM7s6LQAWz8RJomC0pEQDE2vrbV1IhkPEirtmliWnErU7Ry ZRfrVWXlZgFZFxRYkMtyCFsQXDegViwiLKKILg0IXiBoQbrcroBggaGtSf89x/u8eZ8v+cSk TbLYTrwvIJiXBUj9JLQFpa8ZbXC9NaL2WdEyxoKhOYeAKsVqaCwuQmAeTyPhyp9tFFSU6UTQ HxpBglZ3goChC5M0DFXX0vDyxiACg7aNgfTu2wy80rZMue0vRJB+N5yCieZYGrpUl0hoGumj 4a0+nIGumg4G9PFT6xs1r0RQVVvJQGyPPaSpLhLQmdAhgrTkMAJy22JEkG8sQaAeVSF4+ocd pKYYEJjO2oNhOIIGfVMmgt+yCRg9ORfeGEppuB3rD31n0giIMedSkHQmFEF/tEkExsvpNDzW vhVB4/V6EURlXkbwvCqeAlV2GAmxzeU09Md10FBdcoeCh4l5FNTXGCgIyxwkYaygVgSxp5IZ 0MacF0HB7ecEnMtfAgOVO6C3q4gCZUIU+lzKGZu2cOaI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Y/cZs3Mtjt4xdQWlilGhtgFi0Zm1wgDh47WqBp2t4whGJGz9Wksh8yzAJ jPxfH8Zz8VJiZ2NX1RkPLqyOXNKOKbsT7kUdOJwaOhM9aXEJ8857tkw8lSneeKbn1MSNhI/D l3oOPaxuCesMMPXuPO5htjARme8ZePuCLlvMn260Dezvur1yV6NldPhSdruvWr8dK530/PHX z0QnIlWGkXe//+COPmWpz5YNIz7vNH0dqqnWbt6eY/d/v2/plorxH5BdMb+A52lYn+aLfOoC Dm5+7vs4hZzu8NKE6D9ZybW+SNXcuEYujvLDVcc8Dp65Zp/8MqkgYr7RNNAcrZPOdhm/Kba8 tqwvWpAT3lq+YPGKTEtYRFiZ56n8dePLF5Ra3riu3NbB2Vq/adOOhbyJ5N/EOU2f33pQvuWr KAGh2CMR+eFyheQfqa/esMoEAAA= X-CMS-MailID: 20230621130617eucas1p2525f138d93e3e4d0385cda670558b863 X-Msg-Generator: CA X-RootMTR: 20230621094824eucas1p2b6adfbd3f15ff3665674917f419b25d3 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20230621094824eucas1p2b6adfbd3f15ff3665674917f419b25d3 References: <20230621091000.424843-1-j.granados@samsung.com> <20230621094817.433842-1-j.granados@samsung.com> <87o7l92hg8.fsf@intel.com> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net --avrt2cz7yepdubk6 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jun 21, 2023 at 02:16:55PM +0300, Jani Nikula wrote: > On Wed, 21 Jun 2023, Joel Granados wrote: > > Remove the empty end element from all the arrays that are passed to the > > register sysctl calls. In some files this means reducing the explicit > > array size by one. Also make sure that we are using the size in > > ctl_table_header instead of evaluating the .procname element. >=20 > Where's the harm in removing the end elements driver by driver? This is > an unwieldy patch to handle. I totally agree. Its a big one!!! but I'm concerned of breaking bisectibili= ty: * I could for example separate all the removes into separate commits and then have a final commit that removes the check for the empty element. But this will leave the tree in a state where the for loop will have undefined behavior when it looks for the empty end element. It might or might not work (probably not :) until the final commit where I fix that. * I could also change the logic that looks for the final element, commit that first and then remove the empty element one commit per driver after that. But then for all the arrays that still have an empty element, there would again be undefined behavior as it would think that the last element is valid (when it is really the sentinel). Any ideas on how to get around these? >=20 > > diff --git a/drivers/gpu/drm/i915/i915_perf.c b/drivers/gpu/drm/i915/i9= 15_perf.c > > index f43950219ffc..e4d7372afb10 100644 > > --- a/drivers/gpu/drm/i915/i915_perf.c > > +++ b/drivers/gpu/drm/i915/i915_perf.c > > @@ -4884,24 +4884,23 @@ int i915_perf_remove_config_ioctl(struct drm_de= vice *dev, void *data, > > =20 > > static struct ctl_table oa_table[] =3D { > > { > > - .procname =3D "perf_stream_paranoid", > > - .data =3D &i915_perf_stream_paranoid, > > - .maxlen =3D sizeof(i915_perf_stream_paranoid), > > - .mode =3D 0644, > > - .proc_handler =3D proc_dointvec_minmax, > > - .extra1 =3D SYSCTL_ZERO, > > - .extra2 =3D SYSCTL_ONE, > > - }, > > + .procname =3D "perf_stream_paranoid", > > + .data =3D &i915_perf_stream_paranoid, > > + .maxlen =3D sizeof(i915_perf_stream_paranoid), > > + .mode =3D 0644, > > + .proc_handler =3D proc_dointvec_minmax, > > + .extra1 =3D SYSCTL_ZERO, > > + .extra2 =3D SYSCTL_ONE, > > + }, > > { > > - .procname =3D "oa_max_sample_rate", > > - .data =3D &i915_oa_max_sample_rate, > > - .maxlen =3D sizeof(i915_oa_max_sample_rate), > > - .mode =3D 0644, > > - .proc_handler =3D proc_dointvec_minmax, > > - .extra1 =3D SYSCTL_ZERO, > > - .extra2 =3D &oa_sample_rate_hard_limit, > > - }, > > - {} > > + .procname =3D "oa_max_sample_rate", > > + .data =3D &i915_oa_max_sample_rate, > > + .maxlen =3D sizeof(i915_oa_max_sample_rate), > > + .mode =3D 0644, > > + .proc_handler =3D proc_dointvec_minmax, > > + .extra1 =3D SYSCTL_ZERO, > > + .extra2 =3D &oa_sample_rate_hard_limit, > > + } > > }; >=20 > The existing indentation is off, but fixing it doesn't really belong in > this patch. Agreed. But I actually was trying to fix something that checkpatch flagged. I'll change these back (which will cause this patch to be flagged). An alternative solution would be to fix the indentation as part of the preparation patches. Tell me what you think. Thx >=20 > BR, > Jani. >=20 >=20 > --=20 > Jani Nikula, Intel Open Source Graphics Center --=20 Joel Granados --avrt2cz7yepdubk6 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEErkcJVyXmMSXOyyeQupfNUreWQU8FAmSS9cQACgkQupfNUreW QU/tWQv+LHqhRfLnActmTK06NicBnR3PUYRIMank4jSVG6jtvqu/VBMNmvKyRaeA 68kGzzIEbayPbBOL1M2GmrBgIaWp9OIWt4jKQeY4ARm9DcL2FWqUqLufGoPlwjX/ 0GFjsIlBykddf6c3149Hf7D2Xz+hZyF8GgqMaIuty4hcNbIoeYs5zmwPaQmn+/q0 eoe07uBOs32ocQPIMJuRPMw6KSxHYOiWbNHxgQlIl7stObKOuvQXO2GLDgqHc13y NKMTC6XNh4VAc7JHtrsEVEBiVro3IGh7cS5U5DK0jhlSLsRfJUkXmSO4H9EwGLBq mWAl5Qr+YGnCrfE6jGc7uTM0etzscRGIlKIJ+7qcLgSfVgkqYeb5AmkZ8bvailD8 h66rr3XzwBKiQRaXpk6V7/IliqJcG7+N2yGsGJ3UXpvoF/1ieeb39kcSOFZ75BU5 USV/t5Fj0VqHetwv6dC5A8RLktlHNQZcTAXJkLL0QZ5xrmWC9kiIJ/EzJnCgJlSu AwkfgT+P =LLXc -----END PGP SIGNATURE----- --avrt2cz7yepdubk6-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org E30B841B42 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 62FFB41936 DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20230621130618euoutp029d7307487d761f7bf2f8f6f0c9e5bc6d~qrmmZaJYP1283412834euoutp024 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1687352779; bh=tF4riIzozstFHcZHBtz5SQAzztgzSEi85C6+BMxI57A=; h=Date:From:To:CC:Subject:In-Reply-To:References:From; b=KizIn4h/+VubKpimOPqcdjHWTOSNrdxhq52NIdlcN6uvcXLAB6nFiyBh7t4SmSiCP td604+vg7J45oRN7XVDY0MruktIM6Tfp+rbOoX3PpG3N0t8hckrvJWga2W8NV3jyeY H1l5Lg0B87tZSR6VD/1dW5vkoQMqYyIu+p+NXDVs= Date: Wed, 21 Jun 2023 15:06:14 +0200 From: Joel Granados Message-ID: <20230621130614.s36w4u7dzmb5d5p3@localhost> MIME-Version: 1.0 Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="avrt2cz7yepdubk6" Content-Disposition: inline In-Reply-To: <87o7l92hg8.fsf@intel.com> References: <20230621091000.424843-1-j.granados@samsung.com> <20230621094817.433842-1-j.granados@samsung.com> <87o7l92hg8.fsf@intel.com> Subject: Re: [Bridge] [PATCH 09/11] sysctl: Remove the end element in sysctl table arrays List-Id: Linux Ethernet Bridging List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jani Nikula Cc: Juri Lelli , Miaohe Lin , "Rafael J. Wysocki" , Catalin Marinas , dri-devel@lists.freedesktop.org, Ben Segall , linux-sctp@vger.kernel.org, ocfs2-devel@oss.oracle.com, Miquel Raynal , Alexander Gordeev , "K. Y. Srinivasan" , Stefan Schmidt , Wei Liu , Vincent Guittot , Michael Ellerman , bridge@lists.linux-foundation.org, James Morris , Christophe Leroy , Jozsef Kadlecsik , Eric Biggers , linux-cachefs@redhat.com, Mel Gorman , "Darrick J. Wong" , Waiman Long , Christian Borntraeger , Petr Mladek , Martin Schiller , Russ Weight , Tvrtko Ursulin , Boqun Feng , Nicholas Piggin , John Ogness , Alexander Viro , Andy Lutomirski , Remi Denis-Courmont , xen-devel@lists.xenproject.org, Thomas Gleixner , Trond Myklebust , Anton Altaparmakov , Christian Brauner , Will Drewry , Neil Horman , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, Ralf Baechle , Sergey Senozhatsky , mcgrof@kernel.org, Chuck Lever , netfilter-devel@vger.kernel.org, Masami Hiramatsu , Jiri Olsa , linux-fsdevel@vger.kernel.org, Matthieu Baerts , Andrew Morton , linux-trace-kernel@vger.kernel.org, linux-wpan@vger.kernel.org, Mark Rutland , linux-aio@kvack.org, "Jason A. Donenfeld" , linux-ia64@vger.kernel.org, Naoya Horiguchi , Dave Hansen , Clemens Ladisch , Phillip Potter , Song Liu , Eric Dumazet , keyrings@vger.kernel.org, John Stultz , Stanislav Fomichev , Jan Karcher , codalist@telemann.coda.cs.cmu.edu, linux-s390@vger.kernel.org, Valentin Schneider , Stefano Stabellini , Corey Minyard , Leon Romanovsky , Oleksandr Tyshchenko , Will Deacon , John Fastabend , Andrii Nakryiko , Anil S Keshavamurthy , Mat Martineau , Matthew Bobrowski , Julian Anastasov , coreteam@netfilter.org, Roopa Prabhu , Yonghong Song , Iurii Zaikin , Sven Schnelle , Vasily Gorbik , Mike Travis , Wenjia Zhang , Simon Horman , Xin Long , linux-arm-kernel@lists.infradead.org, fsverity@lists.linux.dev, Hao Luo , Theodore Ts'o , Stephen Boyd , Muchun Song , Florian Westphal , Robin Holt , "David S. Miller" , Jon Maloy , Jarkko Sakkinen , Eric Biederman , Anna Schumaker , Daniel Bristot de Oliveira , Mike Kravetz , Marcelo Ricardo Leitner , Benjamin Herrenschmidt , linux-hams@vger.kernel.org, Nikolay Aleksandrov , Joonas Lahtinen , Alexei Starovoitov , Marc Dionne , Jiri Slaby , linux-afs@lists.infradead.org, Daniel Borkmann , linux-rdma@vger.kernel.org, Dexuan Cui , "Matthew Wilcox (Oracle)" , lvs-devel@vger.kernel.org, coda@cs.cmu.edu, Doug Gilbert , "Naveen N. Rao" , Gerald Schaefer , Paolo Abeni , Pablo Neira Ayuso , "Serge E. Hallyn" , Kees Cook , Arnd Bergmann , Haiyang Zhang , intel-gfx@lists.freedesktop.org, Steven Rostedt , linux-crypto@vger.kernel.org, Borislav Petkov , Rodrigo Vivi , openipmi-developer@lists.sourceforge.net, mptcp@lists.linux.dev, Jan Harkes , linux-nfs@vger.kernel.org, "Martin K. Petersen" , linux-mm@kvack.org, Jeff Layton , Andy Lutomirski , linux-xfs@vger.kernel.org, linux-ntfs-dev@lists.sourceforge.net, netdev@vger.kernel.org, Ying Xue , bpf@vger.kernel.org, Sudip Mukherjee , Dietmar Eggemann , Alexander Aring , Jan Kara , Steve Wahl , Peter Zijlstra , Balbir Singh , Amir Goldstein , KP Singh , David Howells , Joseph Qi , "H. Peter Anvin" , David Airlie , Steffen Klassert , rds-devel@oss.oracle.com, Herbert Xu , linux-scsi@vger.kernel.org, dccp@vger.kernel.org, Mark Fasheh , x86@kernel.org, Russell King , Jason Gunthorpe , Ingo Molnar , Jakub Kicinski , "James E.J. Bottomley" , Joerg Reuter , linux-hyperv@vger.kernel.org, Heiko Carstens , Santosh Shilimkar , apparmor@lists.ubuntu.com, linux-raid@vger.kernel.org, Paul Moore , Juergen Gross , John Johansen , linux-x25@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, David Ahern , kexec@lists.infradead.org, linux-security-module@vger.kernel.org, Benjamin LaHaise , tipc-discussion@lists.sourceforge.net, Daniel Vetter , Martin KaFai Lau , Karsten Graul , Joel Becker --avrt2cz7yepdubk6 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jun 21, 2023 at 02:16:55PM +0300, Jani Nikula wrote: > On Wed, 21 Jun 2023, Joel Granados wrote: > > Remove the empty end element from all the arrays that are passed to the > > register sysctl calls. In some files this means reducing the explicit > > array size by one. Also make sure that we are using the size in > > ctl_table_header instead of evaluating the .procname element. >=20 > Where's the harm in removing the end elements driver by driver? This is > an unwieldy patch to handle. I totally agree. Its a big one!!! but I'm concerned of breaking bisectibili= ty: * I could for example separate all the removes into separate commits and then have a final commit that removes the check for the empty element. But this will leave the tree in a state where the for loop will have undefined behavior when it looks for the empty end element. It might or might not work (probably not :) until the final commit where I fix that. * I could also change the logic that looks for the final element, commit that first and then remove the empty element one commit per driver after that. But then for all the arrays that still have an empty element, there would again be undefined behavior as it would think that the last element is valid (when it is really the sentinel). Any ideas on how to get around these? >=20 > > diff --git a/drivers/gpu/drm/i915/i915_perf.c b/drivers/gpu/drm/i915/i9= 15_perf.c > > index f43950219ffc..e4d7372afb10 100644 > > --- a/drivers/gpu/drm/i915/i915_perf.c > > +++ b/drivers/gpu/drm/i915/i915_perf.c > > @@ -4884,24 +4884,23 @@ int i915_perf_remove_config_ioctl(struct drm_de= vice *dev, void *data, > > =20 > > static struct ctl_table oa_table[] =3D { > > { > > - .procname =3D "perf_stream_paranoid", > > - .data =3D &i915_perf_stream_paranoid, > > - .maxlen =3D sizeof(i915_perf_stream_paranoid), > > - .mode =3D 0644, > > - .proc_handler =3D proc_dointvec_minmax, > > - .extra1 =3D SYSCTL_ZERO, > > - .extra2 =3D SYSCTL_ONE, > > - }, > > + .procname =3D "perf_stream_paranoid", > > + .data =3D &i915_perf_stream_paranoid, > > + .maxlen =3D sizeof(i915_perf_stream_paranoid), > > + .mode =3D 0644, > > + .proc_handler =3D proc_dointvec_minmax, > > + .extra1 =3D SYSCTL_ZERO, > > + .extra2 =3D SYSCTL_ONE, > > + }, > > { > > - .procname =3D "oa_max_sample_rate", > > - .data =3D &i915_oa_max_sample_rate, > > - .maxlen =3D sizeof(i915_oa_max_sample_rate), > > - .mode =3D 0644, > > - .proc_handler =3D proc_dointvec_minmax, > > - .extra1 =3D SYSCTL_ZERO, > > - .extra2 =3D &oa_sample_rate_hard_limit, > > - }, > > - {} > > + .procname =3D "oa_max_sample_rate", > > + .data =3D &i915_oa_max_sample_rate, > > + .maxlen =3D sizeof(i915_oa_max_sample_rate), > > + .mode =3D 0644, > > + .proc_handler =3D proc_dointvec_minmax, > > + .extra1 =3D SYSCTL_ZERO, > > + .extra2 =3D &oa_sample_rate_hard_limit, > > + } > > }; >=20 > The existing indentation is off, but fixing it doesn't really belong in > this patch. Agreed. But I actually was trying to fix something that checkpatch flagged. I'll change these back (which will cause this patch to be flagged). An alternative solution would be to fix the indentation as part of the preparation patches. Tell me what you think. Thx >=20 > BR, > Jani. >=20 >=20 > --=20 > Jani Nikula, Intel Open Source Graphics Center --=20 Joel Granados --avrt2cz7yepdubk6 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEErkcJVyXmMSXOyyeQupfNUreWQU8FAmSS9cQACgkQupfNUreW QU/tWQv+LHqhRfLnActmTK06NicBnR3PUYRIMank4jSVG6jtvqu/VBMNmvKyRaeA 68kGzzIEbayPbBOL1M2GmrBgIaWp9OIWt4jKQeY4ARm9DcL2FWqUqLufGoPlwjX/ 0GFjsIlBykddf6c3149Hf7D2Xz+hZyF8GgqMaIuty4hcNbIoeYs5zmwPaQmn+/q0 eoe07uBOs32ocQPIMJuRPMw6KSxHYOiWbNHxgQlIl7stObKOuvQXO2GLDgqHc13y NKMTC6XNh4VAc7JHtrsEVEBiVro3IGh7cS5U5DK0jhlSLsRfJUkXmSO4H9EwGLBq mWAl5Qr+YGnCrfE6jGc7uTM0etzscRGIlKIJ+7qcLgSfVgkqYeb5AmkZ8bvailD8 h66rr3XzwBKiQRaXpk6V7/IliqJcG7+N2yGsGJ3UXpvoF/1ieeb39kcSOFZ75BU5 USV/t5Fj0VqHetwv6dC5A8RLktlHNQZcTAXJkLL0QZ5xrmWC9kiIJ/EzJnCgJlSu AwkfgT+P =LLXc -----END PGP SIGNATURE----- --avrt2cz7yepdubk6-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 01F97EB64DC for ; Tue, 27 Jun 2023 14:38:36 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E213A10E2FB; Tue, 27 Jun 2023 14:38:34 +0000 (UTC) Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7ED9710E46E; Wed, 21 Jun 2023 13:06:21 +0000 (UTC) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20230621130618euoutp029d7307487d761f7bf2f8f6f0c9e5bc6d~qrmmZaJYP1283412834euoutp024; Wed, 21 Jun 2023 13:06:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20230621130618euoutp029d7307487d761f7bf2f8f6f0c9e5bc6d~qrmmZaJYP1283412834euoutp024 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1687352779; bh=tF4riIzozstFHcZHBtz5SQAzztgzSEi85C6+BMxI57A=; h=Date:From:To:CC:Subject:In-Reply-To:References:From; b=KizIn4h/+VubKpimOPqcdjHWTOSNrdxhq52NIdlcN6uvcXLAB6nFiyBh7t4SmSiCP td604+vg7J45oRN7XVDY0MruktIM6Tfp+rbOoX3PpG3N0t8hckrvJWga2W8NV3jyeY H1l5Lg0B87tZSR6VD/1dW5vkoQMqYyIu+p+NXDVs= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20230621130618eucas1p24a0ecfda837a4bd159368de20c0d1f69~qrml_A2lL0200602006eucas1p2B; Wed, 21 Jun 2023 13:06:18 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id 84.F5.42423.AC5F2946; Wed, 21 Jun 2023 14:06:18 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20230621130617eucas1p2525f138d93e3e4d0385cda670558b863~qrmlJMDn80596505965eucas1p2T; Wed, 21 Jun 2023 13:06:17 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20230621130617eusmtrp157908a4e096267c8ad2bfbaa7ff6b47e~qrmlGGTkZ0857208572eusmtrp1W; Wed, 21 Jun 2023 13:06:17 +0000 (GMT) X-AuditID: cbfec7f2-a51ff7000002a5b7-82-6492f5ca367b Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id F1.B8.14344.9C5F2946; Wed, 21 Jun 2023 14:06:17 +0100 (BST) Received: from CAMSVWEXC02.scsc.local (unknown [106.1.227.72]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20230621130616eusmtip17e21dd5f7eca1289642f50e5db94443d~qrmkf0BdK0234302343eusmtip1d; Wed, 21 Jun 2023 13:06:16 +0000 (GMT) Received: from localhost (106.210.248.248) by CAMSVWEXC02.scsc.local (2002:6a01:e348::6a01:e348) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 21 Jun 2023 14:06:15 +0100 Date: Wed, 21 Jun 2023 15:06:14 +0200 From: Joel Granados To: Jani Nikula Message-ID: <20230621130614.s36w4u7dzmb5d5p3@localhost> MIME-Version: 1.0 Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="avrt2cz7yepdubk6" Content-Disposition: inline In-Reply-To: <87o7l92hg8.fsf@intel.com> X-Originating-IP: [106.210.248.248] X-ClientProxiedBy: CAMSVWEXC01.scsc.local (2002:6a01:e347::6a01:e347) To CAMSVWEXC02.scsc.local (2002:6a01:e348::6a01:e348) X-Brightmail-Tracker: H4sIAAAAAAAAA2VTaUwUZxjuNzM7s6LQAWz8RJomC0pEQDE2vrbV1IhkPEirtmliWnErU7Ry ZRfrVWXlZgFZFxRYkMtyCFsQXDegViwiLKKILg0IXiBoQbrcroBggaGtSf89x/u8eZ8v+cSk TbLYTrwvIJiXBUj9JLQFpa8ZbXC9NaL2WdEyxoKhOYeAKsVqaCwuQmAeTyPhyp9tFFSU6UTQ HxpBglZ3goChC5M0DFXX0vDyxiACg7aNgfTu2wy80rZMue0vRJB+N5yCieZYGrpUl0hoGumj 4a0+nIGumg4G9PFT6xs1r0RQVVvJQGyPPaSpLhLQmdAhgrTkMAJy22JEkG8sQaAeVSF4+ocd pKYYEJjO2oNhOIIGfVMmgt+yCRg9ORfeGEppuB3rD31n0giIMedSkHQmFEF/tEkExsvpNDzW vhVB4/V6EURlXkbwvCqeAlV2GAmxzeU09Md10FBdcoeCh4l5FNTXGCgIyxwkYaygVgSxp5IZ 0MacF0HB7ecEnMtfAgOVO6C3q4gCZUIU+lzKGZu2cOaIkxSnzdAiztRQh7gM7VFOo4inuTTF PYrLqt7K6c4/ILjY6h6Sy+lWUNzD3ArElTxQ01yF5hHD6a8v5sKvtTJffrzT4jMf3m/fT7xs +brdFnvTSiLJIIPkUI3xCqFApfZKJBZjdhXO716uRBZiG7YA4fGzF2iBDCN86peRWTKEcGr2 U5ESzZlJlHbkiwQjH+F23TXi36mbr6+SArmEcEd9IpqOUOxi/Drh9EycZl3w3d6H5DSez7ri X1s6Z1aR7P01OKqseiZgy27H4T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oC Dm5+7vs4hZzu8NKE6D9ZybW+SNXcuEYujvLDVcc8Dp65Zp/8MqkgYr7RNNAcrZPOdhm/Kba8 tqwvWpAT3lq+YPGKTEtYRFiZ56n8dePLF5Ra3riu3NbB2Vq/adOOhbyJ5N/EOU2f33pQvuWr KAGh2CMR+eFyheQfqa/esMoEAAA= X-CMS-MailID: 20230621130617eucas1p2525f138d93e3e4d0385cda670558b863 X-Msg-Generator: CA X-RootMTR: 20230621094824eucas1p2b6adfbd3f15ff3665674917f419b25d3 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20230621094824eucas1p2b6adfbd3f15ff3665674917f419b25d3 References: <20230621091000.424843-1-j.granados@samsung.com> <20230621094817.433842-1-j.granados@samsung.com> <87o7l92hg8.fsf@intel.com> X-Mailman-Approved-At: Tue, 27 Jun 2023 14:38:30 +0000 Subject: Re: [Intel-gfx] [PATCH 09/11] sysctl: Remove the end element in sysctl table arrays X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Juri Lelli , Miaohe Lin , "Rafael J. Wysocki" , Catalin Marinas , dri-devel@lists.freedesktop.org, Ben Segall , linux-sctp@vger.kernel.org, ocfs2-devel@oss.oracle.com, Miquel Raynal , Alexander Gordeev , "K. Y. Srinivasan" , Stefan Schmidt , Wei Liu , Michael Ellerman , bridge@lists.linux-foundation.org, James Morris , Christophe Leroy , Jozsef Kadlecsik , Eric Biggers , linux-cachefs@redhat.com, Mel Gorman , "Darrick J. Wong" , Waiman Long , Christian Borntraeger , Petr Mladek , Martin Schiller , Russ Weight , Boqun Feng , Nicholas Piggin , John Ogness , Alexander Viro , Andy Lutomirski , Remi Denis-Courmont , xen-devel@lists.xenproject.org, Thomas Gleixner , Trond Myklebust , Anton Altaparmakov , Christian Brauner , Will Drewry , Neil Horman , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, Ralf Baechle , Sergey Senozhatsky , mcgrof@kernel.org, Chuck Lever , netfilter-devel@vger.kernel.org, Masami Hiramatsu , Jiri Olsa , linux-fsdevel@vger.kernel.org, Matthieu Baerts , Andrew Morton , linux-trace-kernel@vger.kernel.org, linux-wpan@vger.kernel.org, Mark Rutland , linux-aio@kvack.org, "Jason A. Donenfeld" , linux-ia64@vger.kernel.org, Naoya Horiguchi , Dave Hansen , Clemens Ladisch , Phillip Potter , Song Liu , Eric Dumazet , keyrings@vger.kernel.org, John Stultz , Stanislav Fomichev , Jan Karcher , codalist@telemann.coda.cs.cmu.edu, linux-s390@vger.kernel.org, Valentin Schneider , Stefano Stabellini , Corey Minyard , Leon Romanovsky , Oleksandr Tyshchenko , Will Deacon , John Fastabend , Andrii Nakryiko , Anil S Keshavamurthy , Mat Martineau , Matthew Bobrowski , Julian Anastasov , coreteam@netfilter.org, Roopa Prabhu , Yonghong Song , Iurii Zaikin , Sven Schnelle , Vasily Gorbik , Mike Travis , Wenjia Zhang , Simon Horman , Xin Long , linux-arm-kernel@lists.infradead.org, fsverity@lists.linux.dev, Hao Luo , Theodore Ts'o , Stephen Boyd , Muchun Song , Florian Westphal , Robin Holt , "David S. Miller" , Jon Maloy , Jarkko Sakkinen , Eric Biederman , Anna Schumaker , Daniel Bristot de Oliveira , Mike Kravetz , Marcelo Ricardo Leitner , Benjamin Herrenschmidt , linux-hams@vger.kernel.org, Nikolay Aleksandrov , Alexei Starovoitov , Marc Dionne , Jiri Slaby , linux-afs@lists.infradead.org, Daniel Borkmann , linux-rdma@vger.kernel.org, Dexuan Cui , "Matthew Wilcox \(Oracle\)" , lvs-devel@vger.kernel.org, coda@cs.cmu.edu, Doug Gilbert , "Naveen N. Rao" , Gerald Schaefer , Paolo Abeni , Pablo Neira Ayuso , "Serge E. Hallyn" , Kees Cook , Arnd Bergmann , Haiyang Zhang , intel-gfx@lists.freedesktop.org, Steven Rostedt , linux-crypto@vger.kernel.org, Borislav Petkov , Rodrigo Vivi , openipmi-developer@lists.sourceforge.net, mptcp@lists.linux.dev, Jan Harkes , linux-nfs@vger.kernel.org, "Martin K. Petersen" , linux-mm@kvack.org, Jeff Layton , Andy Lutomirski , linux-xfs@vger.kernel.org, linux-ntfs-dev@lists.sourceforge.net, netdev@vger.kernel.org, Ying Xue , bpf@vger.kernel.org, Sudip Mukherjee , Dietmar Eggemann , Alexander Aring , Jan Kara , Steve Wahl , Peter Zijlstra , Balbir Singh , Amir Goldstein , KP Singh , David Howells , Joseph Qi , "H. Peter Anvin" , David Airlie , Steffen Klassert , rds-devel@oss.oracle.com, Herbert Xu , linux-scsi@vger.kernel.org, dccp@vger.kernel.org, Mark Fasheh , x86@kernel.org, Russell King , Jason Gunthorpe , Ingo Molnar , Jakub Kicinski , "James E.J. Bottomley" , Joerg Reuter , linux-hyperv@vger.kernel.org, Heiko Carstens , Santosh Shilimkar , apparmor@lists.ubuntu.com, linux-raid@vger.kernel.org, Paul Moore , Juergen Gross , John Johansen , linux-x25@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, David Ahern , kexec@lists.infradead.org, linux-security-module@vger.kernel.org, Benjamin LaHaise , tipc-discussion@lists.sourceforge.net, Daniel Vetter , Martin KaFai Lau , Karsten Graul , Joel Becker Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" --avrt2cz7yepdubk6 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jun 21, 2023 at 02:16:55PM +0300, Jani Nikula wrote: > On Wed, 21 Jun 2023, Joel Granados wrote: > > Remove the empty end element from all the arrays that are passed to the > > register sysctl calls. In some files this means reducing the explicit > > array size by one. Also make sure that we are using the size in > > ctl_table_header instead of evaluating the .procname element. >=20 > Where's the harm in removing the end elements driver by driver? This is > an unwieldy patch to handle. I totally agree. Its a big one!!! but I'm concerned of breaking bisectibili= ty: * I could for example separate all the removes into separate commits and then have a final commit that removes the check for the empty element. But this will leave the tree in a state where the for loop will have undefined behavior when it looks for the empty end element. It might or might not work (probably not :) until the final commit where I fix that. * I could also change the logic that looks for the final element, commit that first and then remove the empty element one commit per driver after that. But then for all the arrays that still have an empty element, there would again be undefined behavior as it would think that the last element is valid (when it is really the sentinel). Any ideas on how to get around these? >=20 > > diff --git a/drivers/gpu/drm/i915/i915_perf.c b/drivers/gpu/drm/i915/i9= 15_perf.c > > index f43950219ffc..e4d7372afb10 100644 > > --- a/drivers/gpu/drm/i915/i915_perf.c > > +++ b/drivers/gpu/drm/i915/i915_perf.c > > @@ -4884,24 +4884,23 @@ int i915_perf_remove_config_ioctl(struct drm_de= vice *dev, void *data, > > =20 > > static struct ctl_table oa_table[] =3D { > > { > > - .procname =3D "perf_stream_paranoid", > > - .data =3D &i915_perf_stream_paranoid, > > - .maxlen =3D sizeof(i915_perf_stream_paranoid), > > - .mode =3D 0644, > > - .proc_handler =3D proc_dointvec_minmax, > > - .extra1 =3D SYSCTL_ZERO, > > - .extra2 =3D SYSCTL_ONE, > > - }, > > + .procname =3D "perf_stream_paranoid", > > + .data =3D &i915_perf_stream_paranoid, > > + .maxlen =3D sizeof(i915_perf_stream_paranoid), > > + .mode =3D 0644, > > + .proc_handler =3D proc_dointvec_minmax, > > + .extra1 =3D SYSCTL_ZERO, > > + .extra2 =3D SYSCTL_ONE, > > + }, > > { > > - .procname =3D "oa_max_sample_rate", > > - .data =3D &i915_oa_max_sample_rate, > > - .maxlen =3D sizeof(i915_oa_max_sample_rate), > > - .mode =3D 0644, > > - .proc_handler =3D proc_dointvec_minmax, > > - .extra1 =3D SYSCTL_ZERO, > > - .extra2 =3D &oa_sample_rate_hard_limit, > > - }, > > - {} > > + .procname =3D "oa_max_sample_rate", > > + .data =3D &i915_oa_max_sample_rate, > > + .maxlen =3D sizeof(i915_oa_max_sample_rate), > > + .mode =3D 0644, > > + .proc_handler =3D proc_dointvec_minmax, > > + .extra1 =3D SYSCTL_ZERO, > > + .extra2 =3D &oa_sample_rate_hard_limit, > > + } > > }; >=20 > The existing indentation is off, but fixing it doesn't really belong in > this patch. Agreed. But I actually was trying to fix something that checkpatch flagged. I'll change these back (which will cause this patch to be flagged). An alternative solution would be to fix the indentation as part of the preparation patches. Tell me what you think. Thx >=20 > BR, > Jani. >=20 >=20 > --=20 > Jani Nikula, Intel Open Source Graphics Center --=20 Joel Granados --avrt2cz7yepdubk6 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEErkcJVyXmMSXOyyeQupfNUreWQU8FAmSS9cQACgkQupfNUreW QU/tWQv+LHqhRfLnActmTK06NicBnR3PUYRIMank4jSVG6jtvqu/VBMNmvKyRaeA 68kGzzIEbayPbBOL1M2GmrBgIaWp9OIWt4jKQeY4ARm9DcL2FWqUqLufGoPlwjX/ 0GFjsIlBykddf6c3149Hf7D2Xz+hZyF8GgqMaIuty4hcNbIoeYs5zmwPaQmn+/q0 eoe07uBOs32ocQPIMJuRPMw6KSxHYOiWbNHxgQlIl7stObKOuvQXO2GLDgqHc13y NKMTC6XNh4VAc7JHtrsEVEBiVro3IGh7cS5U5DK0jhlSLsRfJUkXmSO4H9EwGLBq mWAl5Qr+YGnCrfE6jGc7uTM0etzscRGIlKIJ+7qcLgSfVgkqYeb5AmkZ8bvailD8 h66rr3XzwBKiQRaXpk6V7/IliqJcG7+N2yGsGJ3UXpvoF/1ieeb39kcSOFZ75BU5 USV/t5Fj0VqHetwv6dC5A8RLktlHNQZcTAXJkLL0QZ5xrmWC9kiIJ/EzJnCgJlSu AwkfgT+P =LLXc -----END PGP SIGNATURE----- --avrt2cz7yepdubk6-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joel Granados Subject: Re: [PATCH 09/11] sysctl: Remove the end element in sysctl table arrays Date: Wed, 21 Jun 2023 15:06:14 +0200 Message-ID: <20230621130614.s36w4u7dzmb5d5p3@localhost> References: <20230621091000.424843-1-j.granados@samsung.com> <20230621094817.433842-1-j.granados@samsung.com> <87o7l92hg8.fsf@intel.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="avrt2cz7yepdubk6" Return-path: DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20230621130618euoutp029d7307487d761f7bf2f8f6f0c9e5bc6d~qrmmZaJYP1283412834euoutp024 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1687352779; bh=tF4riIzozstFHcZHBtz5SQAzztgzSEi85C6+BMxI57A=; h=Date:From:To:CC:Subject:In-Reply-To:References:From; b=KizIn4h/+VubKpimOPqcdjHWTOSNrdxhq52NIdlcN6uvcXLAB6nFiyBh7t4SmSiCP td604+vg7J45oRN7XVDY0MruktIM6Tfp+rbOoX3PpG3N0t8hckrvJWga2W8NV3jyeY H1l5Lg0B87tZSR6VD/1dW5vkoQMqYyIu+p+NXDVs= List-Id: List-Subscribe: List-Unsubscribe: Content-Disposition: inline In-Reply-To: <87o7l92hg8.fsf@intel.com> To: Jani Nikula Cc: mcgrof@kernel.org, Russell King , Catalin Marinas , Will Deacon , Michael Ellerman , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Gerald Schaefer , Andy Lutomirski , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, Herbert Xu , "David S. Miller" , Russ Weight , Greg Kroah-Hartman , Phillip Potter , Clemens Ladisch , Arnd Bergmann , Corey Minyard , Theodore Ts'o , Ja --avrt2cz7yepdubk6 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jun 21, 2023 at 02:16:55PM +0300, Jani Nikula wrote: > On Wed, 21 Jun 2023, Joel Granados wrote: > > Remove the empty end element from all the arrays that are passed to the > > register sysctl calls. In some files this means reducing the explicit > > array size by one. Also make sure that we are using the size in > > ctl_table_header instead of evaluating the .procname element. >=20 > Where's the harm in removing the end elements driver by driver? This is > an unwieldy patch to handle. I totally agree. Its a big one!!! but I'm concerned of breaking bisectibili= ty: * I could for example separate all the removes into separate commits and then have a final commit that removes the check for the empty element. But this will leave the tree in a state where the for loop will have undefined behavior when it looks for the empty end element. It might or might not work (probably not :) until the final commit where I fix that. * I could also change the logic that looks for the final element, commit that first and then remove the empty element one commit per driver after that. But then for all the arrays that still have an empty element, there would again be undefined behavior as it would think that the last element is valid (when it is really the sentinel). Any ideas on how to get around these? >=20 > > diff --git a/drivers/gpu/drm/i915/i915_perf.c b/drivers/gpu/drm/i915/i9= 15_perf.c > > index f43950219ffc..e4d7372afb10 100644 > > --- a/drivers/gpu/drm/i915/i915_perf.c > > +++ b/drivers/gpu/drm/i915/i915_perf.c > > @@ -4884,24 +4884,23 @@ int i915_perf_remove_config_ioctl(struct drm_de= vice *dev, void *data, > > =20 > > static struct ctl_table oa_table[] =3D { > > { > > - .procname =3D "perf_stream_paranoid", > > - .data =3D &i915_perf_stream_paranoid, > > - .maxlen =3D sizeof(i915_perf_stream_paranoid), > > - .mode =3D 0644, > > - .proc_handler =3D proc_dointvec_minmax, > > - .extra1 =3D SYSCTL_ZERO, > > - .extra2 =3D SYSCTL_ONE, > > - }, > > + .procname =3D "perf_stream_paranoid", > > + .data =3D &i915_perf_stream_paranoid, > > + .maxlen =3D sizeof(i915_perf_stream_paranoid), > > + .mode =3D 0644, > > + .proc_handler =3D proc_dointvec_minmax, > > + .extra1 =3D SYSCTL_ZERO, > > + .extra2 =3D SYSCTL_ONE, > > + }, > > { > > - .procname =3D "oa_max_sample_rate", > > - .data =3D &i915_oa_max_sample_rate, > > - .maxlen =3D sizeof(i915_oa_max_sample_rate), > > - .mode =3D 0644, > > - .proc_handler =3D proc_dointvec_minmax, > > - .extra1 =3D SYSCTL_ZERO, > > - .extra2 =3D &oa_sample_rate_hard_limit, > > - }, > > - {} > > + .procname =3D "oa_max_sample_rate", > > + .data =3D &i915_oa_max_sample_rate, > > + .maxlen =3D sizeof(i915_oa_max_sample_rate), > > + .mode =3D 0644, > > + .proc_handler =3D proc_dointvec_minmax, > > + .extra1 =3D SYSCTL_ZERO, > > + .extra2 =3D &oa_sample_rate_hard_limit, > > + } > > }; >=20 > The existing indentation is off, but fixing it doesn't really belong in > this patch. Agreed. But I actually was trying to fix something that checkpatch flagged. I'll change these back (which will cause this patch to be flagged). An alternative solution would be to fix the indentation as part of the preparation patches. Tell me what you think. Thx >=20 > BR, > Jani. >=20 >=20 > --=20 > Jani Nikula, Intel Open Source Graphics Center --=20 Joel Granados --avrt2cz7yepdubk6 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEErkcJVyXmMSXOyyeQupfNUreWQU8FAmSS9cQACgkQupfNUreW QU/tWQv+LHqhRfLnActmTK06NicBnR3PUYRIMank4jSVG6jtvqu/VBMNmvKyRaeA 68kGzzIEbayPbBOL1M2GmrBgIaWp9OIWt4jKQeY4ARm9DcL2FWqUqLufGoPlwjX/ 0GFjsIlBykddf6c3149Hf7D2Xz+hZyF8GgqMaIuty4hcNbIoeYs5zmwPaQmn+/q0 eoe07uBOs32ocQPIMJuRPMw6KSxHYOiWbNHxgQlIl7stObKOuvQXO2GLDgqHc13y NKMTC6XNh4VAc7JHtrsEVEBiVro3IGh7cS5U5DK0jhlSLsRfJUkXmSO4H9EwGLBq mWAl5Qr+YGnCrfE6jGc7uTM0etzscRGIlKIJ+7qcLgSfVgkqYeb5AmkZ8bvailD8 h66rr3XzwBKiQRaXpk6V7/IliqJcG7+N2yGsGJ3UXpvoF/1ieeb39kcSOFZ75BU5 USV/t5Fj0VqHetwv6dC5A8RLktlHNQZcTAXJkLL0QZ5xrmWC9kiIJ/EzJnCgJlSu AwkfgT+P =LLXc -----END PGP SIGNATURE----- --avrt2cz7yepdubk6-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aib29ajc246.phx1.oracleemaildelivery.com (aib29ajc246.phx1.oracleemaildelivery.com [192.29.103.246]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3FFC7EB64DD for ; Wed, 21 Jun 2023 16:07:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; s=oss-phx-1109; d=oss.oracle.com; h=Date:To:From:Subject:Message-Id:MIME-Version:Sender; bh=AihUHRUNmm95VoDQraql87LPyv0+BiQYI+BGRpUBNpY=; b=2ZnqaEYU1wPu1WVYtD5Ldqkz9LaPsa2GvVX+aouB0qUF41eceFoMwswouy3dp00H6F4kZHe1F1EK z1uv+3uUbFBGmY3lAnpIwEv1tf5pfJ5MK4NydlnRUiSbWZmSbXLIAklRz4Oa83we1aGBvwrBKxS8 DLyvtzWl5UrE/MflCxuHrwQFy7XPv/SCPrT8S14IozRfhzKPiRhzmRZNOTbjYUNeDGhYuLZkuwEd VpiLF9G+omADb43LguNcBLeslbleZn1BT51vrDqQMLUi+HW/WRBJLEi0kmSFw/3Un2BRkKWqI5vW Sr4gEU1qqmNoSWT4lZWAIqDYFmEIgT0vD86m7w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; s=prod-phx-20191217; d=phx1.rp.oracleemaildelivery.com; h=Date:To:From:Subject:Message-Id:MIME-Version:Sender; bh=AihUHRUNmm95VoDQraql87LPyv0+BiQYI+BGRpUBNpY=; b=gHw82X+GEkFDix66AkIl8GcldG1zHEJFZw5UyzxlDTO/aPoaXhtY+J7lLylmLDcGazi2qn+Ygnep wBSRnbzvQ8d4N7pBQCwBqGQt4kKq4ALrdNDVAJvVYWG9tynEL1nuMUmTEcBx4T1lYT97BNVYdbd0 yu1JJMHutbPZe85U7Pu6vUWP9LXngynqt5WFDye47SlDqOhGEHeMOw65wNMYjsofhSpepU7Z81BE FTpsbFOX3Y+O4yme5rVFAgQMa0P6JElFjgfyx9CRA2L20WKI+OK0YtVJKNWT8jftHd/S5d4qz25S rnn5cNYH6UiMX94HEQ6D38+Ss0IugXOrhz/2rQ== Received: by omta-ad1-fd3-101-us-phoenix-1.omtaad1.vcndpphx.oraclevcn.com (Oracle Communications Messaging Server 8.1.0.1.20230523 64bit (built May 23 2023)) with ESMTPS id <0RWM003SL23SLP60@omta-ad1-fd3-101-us-phoenix-1.omtaad1.vcndpphx.oraclevcn.com> for ocfs2-devel@archiver.kernel.org; Wed, 21 Jun 2023 16:07:04 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1687352779; bh=tF4riIzozstFHcZHBtz5SQAzztgzSEi85C6+BMxI57A=; h=Date:From:To:CC:Subject:In-Reply-To:References:From; b=KizIn4h/+VubKpimOPqcdjHWTOSNrdxhq52NIdlcN6uvcXLAB6nFiyBh7t4SmSiCP td604+vg7J45oRN7XVDY0MruktIM6Tfp+rbOoX3PpG3N0t8hckrvJWga2W8NV3jyeY H1l5Lg0B87tZSR6VD/1dW5vkoQMqYyIu+p+NXDVs= Date: Wed, 21 Jun 2023 15:06:14 +0200 To: Jani Nikula Message-id: <20230621130614.s36w4u7dzmb5d5p3@localhost> MIME-version: 1.0 In-reply-to: <87o7l92hg8.fsf@intel.com> X-Originating-IP: [106.210.248.248] References: <20230621091000.424843-1-j.granados@samsung.com> <20230621094817.433842-1-j.granados@samsung.com> <87o7l92hg8.fsf@intel.com> X-Source-IP: 210.118.77.12 X-Proofpoint-Virus-Version: vendor=nai engine=6500 definitions=10747 signatures=596816 X-Proofpoint-Spam-Details: rule=tap_notspam policy=tap score=0 priorityscore=462 phishscore=0 adultscore=0 mlxlogscore=999 lowpriorityscore=0 suspectscore=0 bulkscore=0 clxscore=157 impostorscore=0 spamscore=0 malwarescore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2305260000 definitions=main-2306210109 domainage_hfrom=10431 Cc: Juri Lelli , Miaohe Lin , "Rafael J. Wysocki" , Catalin Marinas , dri-devel@lists.freedesktop.org, Ben Segall , linux-sctp@vger.kernel.org, ocfs2-devel@oss.oracle.com, Miquel Raynal , Alexander Gordeev , "K. Y. Srinivasan" , Stefan Schmidt , Wei Liu , Vincent Guittot , Michael Ellerman , bridge@lists.linux-foundation.org, James Morris , Christophe Leroy , Jozsef Kadlecsik , Eric Biggers , linux-cachefs@redhat.com, Mel Gorman , Waiman Long , Christian Borntraeger , Petr Mladek , Martin Schiller , Russ Weight , Tvrtko Ursulin , Boqun Feng , Nicholas Piggin , John Ogness , Alexander Viro , Andy Lutomirski , Remi Denis-Courmont , xen-devel@lists.xenproject.org, Thomas Gleixner , Trond Myklebust , Anton Altaparmakov , Christian Brauner , Will Drewry , Neil Horman , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, Ralf Baechle , Sergey Senozhatsky , mcgrof@kernel.org, Chuck Lever , netfilter-devel@vger.kernel.org, Masami Hiramatsu , Jiri Olsa , linux-fsdevel@vger.kernel.org, Matthieu Baerts , linux-trace-kernel@vger.kernel.org, linux-wpan@vger.kernel.org, Mark Rutland , linux-aio@kvack.org, "Jason A. Donenfeld" , linux-ia64@vger.kernel.org, Naoya Horiguchi , Dave Hansen , Clemens Ladisch , Phillip Potter , Song Liu , Eric Dumazet , keyrings@vger.kernel.org, John Stultz , Stanislav Fomichev , Jan Karcher , codalist@telemann.coda.cs.cmu.edu, linux-s390@vger.kernel.org, Valentin Schneider , Stefano Stabellini , Corey Minyard , Leon Romanovsky , Oleksandr Tyshchenko , Will Deacon , John Fastabend , Andrii Nakryiko , Anil S Keshavamurthy , Mat Martineau , Matthew Bobrowski , Julian Anastasov , coreteam@netfilter.org, Roopa Prabhu , Yonghong Song , Iurii Zaikin , Sven Schnelle , Vasily Gorbik , Mike Travis , Wenjia Zhang , Simon Horman , Xin Long , linux-arm-kernel@lists.infradead.org, fsverity@lists.linux.dev, Hao Luo , Theodore Ts'o , Stephen Boyd , Muchun Song , Florian Westphal , Robin Holt , "David S. Miller" , Jon Maloy , Jarkko Sakkinen , Eric Biederman , Anna Schumaker , Daniel Bristot de Oliveira , Mike Kravetz , Marcelo Ricardo Leitner , Benjamin Herrenschmidt , linux-hams@vger.kernel.org, Nikolay Aleksandrov , Joonas Lahtinen , Alexei Starovoitov , Marc Dionne , Jiri Slaby , linux-afs@lists.infradead.org, Daniel Borkmann , linux-rdma@vger.kernel.org, Dexuan Cui , lvs-devel@vger.kernel.org, coda@cs.cmu.edu, Doug Gilbert , "Naveen N. Rao" , Gerald Schaefer , Paolo Abeni , Pablo Neira Ayuso , "Serge E. Hallyn" , Kees Cook , Arnd Bergmann , Haiyang Zhang , intel-gfx@lists.freedesktop.org, Steven Rostedt , linux-crypto@vger.kernel.org, Borislav Petkov , Rodrigo Vivi , openipmi-developer@lists.sourceforge.net, mptcp@lists.linux.dev, Jan Harkes , linux-nfs@vger.kernel.org, linux-mm@kvack.org, Jeff Layton , Andy Lutomirski , linux-xfs@vger.kernel.org, linux-ntfs-dev@lists.sourceforge.net, netdev@vger.kernel.org, Ying Xue , bpf@vger.kernel.org, Sudip Mukherjee , Dietmar Eggemann , Alexander Aring , Jan Kara , Steve Wahl , Peter Zijlstra , Balbir Singh , Amir Goldstein , KP Singh , David Howells , "H. Peter Anvin" , David Airlie , Steffen Klassert , rds-devel@oss.oracle.com, Herbert Xu , linux-scsi@vger.kernel.org, dccp@vger.kernel.org, x86@kernel.org, Russell King , Jason Gunthorpe , Ingo Molnar , Jakub Kicinski , "James E.J. Bottomley" , Joerg Reuter , linux-hyperv@vger.kernel.org, Heiko Carstens , Santosh Shilimkar , apparmor@lists.ubuntu.com, linux-raid@vger.kernel.org, Paul Moore , Juergen Gross , John Johansen , linux-x25@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, David Ahern , kexec@lists.infradead.org, linux-security-module@vger.kernel.org, Benjamin LaHaise , tipc-discussion@lists.sourceforge.net, Daniel Vetter , Martin KaFai Lau , Karsten Graul Subject: Re: [Ocfs2-devel] [PATCH 09/11] sysctl: Remove the end element in sysctl table arrays X-BeenThere: ocfs2-devel@oss.oracle.com X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Joel Granados via Ocfs2-devel Reply-to: Joel Granados Content-type: multipart/mixed; boundary="===============4772403580970488365==" Errors-to: ocfs2-devel-bounces@oss.oracle.com X-AuditID: cbfec7f2-a51ff7000002a5b7-82-6492f5ca367b X-ClientProxiedBy: CAMSVWEXC01.scsc.local (2002:6a01:e347::6a01:e347) To CAMSVWEXC02.scsc.local (2002:6a01:e348::6a01:e348) X-Brightmail-Tracker: H4sIAAAAAAAAA2VTaUwUZxjuNzM7s6LQAWz8RJomC0pEQDE2vrbV1IhkPEirtmliWnErU7Ry ZRfrVWXlZgFZFxRYkMtyCFsQXDegViwiLKKILg0IXiBoQbrcroBggaGtSf89x/u8eZ8v+cSk TbLYTrwvIJiXBUj9JLQFpa8ZbXC9NaL2WdEyxoKhOYeAKsVqaCwuQmAeTyPhyp9tFFSU6UTQ HxpBglZ3goChC5M0DFXX0vDyxiACg7aNgfTu2wy80rZMue0vRJB+N5yCieZYGrpUl0hoGumj 4a0+nIGumg4G9PFT6xs1r0RQVVvJQGyPPaSpLhLQmdAhgrTkMAJy22JEkG8sQaAeVSF4+ocd pKYYEJjO2oNhOIIGfVMmgt+yCRg9ORfeGEppuB3rD31n0giIMedSkHQmFEF/tEkExsvpNDzW vhVB4/V6EURlXkbwvCqeAlV2GAmxzeU09Md10FBdcoeCh4l5FNTXGCgIyxwkYaygVgSxp5IZ 0MacF0HB7ecEnMtfAgOVO6C3q4gCZUIU+lzKGZu2cOaIkxSnzdAiztRQh7gM7VFOo4inuTTF PYrLqt7K6c4/ILjY6h6Sy+lWUNzD3ArElTxQ01yF5hHD6a8v5sKvtTJffrzT4jMf3m/fT7xs +brdFnvTSiLJIIPkUI3xCqFApfZKJBZjdhXO716uRBZiG7YA4fGzF2iBDCN86peRWTKEcGr2 U5ESzZlJlHbkiwQjH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r8dK530/PHX z0QnIlWGkXe//+COPmWpz5YNIz7vNH0dqqnWbt6eY/d/v2/plorxH5BdMb+A52lYn+aLfOoC Dm5+7vs4hZzu8NKE6D9ZybW+SNXcuEYujvLDVcc8Dp65Zp/8MqkgYr7RNNAcrZPOdhm/Kba8 tqwvWpAT3lq+YPGKTEtYRFiZ56n8dePLF5Ra3riu3NbB2Vq/adOOhbyJ5N/EOU2f33pQvuWr KAGh2CMR+eFyheQfqa/esMoEAAA= X-CMS-MailID: 20230621130617eucas1p2525f138d93e3e4d0385cda670558b863 X-Msg-Generator: CA X-RootMTR: 20230621094824eucas1p2b6adfbd3f15ff3665674917f419b25d3 X-EPHeader: CA X-CMS-RootMailID: 20230621094824eucas1p2b6adfbd3f15ff3665674917f419b25d3 X-ServerName: mailout2.w1.samsung.com X-Proofpoint-SPF-Result: pass X-Proofpoint-SPF-Record: v=spf1 include:_spf.samsung.com ~all X-Spam: Clean X-Proofpoint-GUID: 1Qmf7i7pbsvz3s87B5apN1_mNgwZUfbc X-Proofpoint-ORIG-GUID: 1Qmf7i7pbsvz3s87B5apN1_mNgwZUfbc X-Mailman-Approved-At: Wed, 21 Jun 2023 16:07:00 +0000 Reporting-Meta: AAG94IoOgFZ7gKhtvYc4kocKs0dbhsPBVv8abOSXNU5wBHW4N6tLJrYVn/8LfeYj ldpJvfdyW5cJEl4LIrzi7mhnTjtxbNGKgKYraHVmxI5v6/jlRtO++rB3Y8UTgHgZ EKawNVf7a8hSHeeGEIEV6f3NmELtsyWrQptfliYmZi5RN941bZVl0I5AjpEmz/i/ IXlBjhH86BruFhF7SH0UZ3MuC95X5DJC3QkPzjzKuuFFukIlIfag8o3C+Rnzd6RJ p0qZW3T//i6wQays6/RGkaPzWC02SPDcHVtdv/HFdZsuSkhyIR3v2ibvsmiAusqo 5QiPKHAyeq1HothmVAq8GlQauULbfgtArcxKFFHmpkDlrkRVyGROZrQCqSZGrNvg R8hVWl7laYw+sIQv6WiU2IojaXyxWRVbTkkiaVFZfZwLL6EaMmGC+oIZftxK6SSd TVEAffrjqCdOl+T1ZkN/Cg4Xq3Z5ZhMgV+iaM/NwkmLsODHtvQVmxvedDoJ/Ptn3 j3A+qE89iAJP4GUQOV2syd7cPJVp13limgq6dxRpQmY= DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20230621130618euoutp029d7307487d761f7bf2f8f6f0c9e5bc6d~qrmmZaJYP1283412834euoutp024 CMS-TYPE: 201P --===============4772403580970488365== Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="avrt2cz7yepdubk6" Content-Disposition: inline --avrt2cz7yepdubk6 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jun 21, 2023 at 02:16:55PM +0300, Jani Nikula wrote: > On Wed, 21 Jun 2023, Joel Granados wrote: > > Remove the empty end element from all the arrays that are passed to the > > register sysctl calls. In some files this means reducing the explicit > > array size by one. Also make sure that we are using the size in > > ctl_table_header instead of evaluating the .procname element. >=20 > Where's the harm in removing the end elements driver by driver? This is > an unwieldy patch to handle. I totally agree. Its a big one!!! but I'm concerned of breaking bisectibili= ty: * I could for example separate all the removes into separate commits and then have a final commit that removes the check for the empty element. But this will leave the tree in a state where the for loop will have undefined behavior when it looks for the empty end element. It might or might not work (probably not :) until the final commit where I fix that. * I could also change the logic that looks for the final element, commit that first and then remove the empty element one commit per driver after that. But then for all the arrays that still have an empty element, there would again be undefined behavior as it would think that the last element is valid (when it is really the sentinel). Any ideas on how to get around these? >=20 > > diff --git a/drivers/gpu/drm/i915/i915_perf.c b/drivers/gpu/drm/i915/i9= 15_perf.c > > index f43950219ffc..e4d7372afb10 100644 > > --- a/drivers/gpu/drm/i915/i915_perf.c > > +++ b/drivers/gpu/drm/i915/i915_perf.c > > @@ -4884,24 +4884,23 @@ int i915_perf_remove_config_ioctl(struct drm_de= vice *dev, void *data, > > =20 > > static struct ctl_table oa_table[] =3D { > > { > > - .procname =3D "perf_stream_paranoid", > > - .data =3D &i915_perf_stream_paranoid, > > - .maxlen =3D sizeof(i915_perf_stream_paranoid), > > - .mode =3D 0644, > > - .proc_handler =3D proc_dointvec_minmax, > > - .extra1 =3D SYSCTL_ZERO, > > - .extra2 =3D SYSCTL_ONE, > > - }, > > + .procname =3D "perf_stream_paranoid", > > + .data =3D &i915_perf_stream_paranoid, > > + .maxlen =3D sizeof(i915_perf_stream_paranoid), > > + .mode =3D 0644, > > + .proc_handler =3D proc_dointvec_minmax, > > + .extra1 =3D SYSCTL_ZERO, > > + .extra2 =3D SYSCTL_ONE, > > + }, > > { > > - .procname =3D "oa_max_sample_rate", > > - .data =3D &i915_oa_max_sample_rate, > > - .maxlen =3D sizeof(i915_oa_max_sample_rate), > > - .mode =3D 0644, > > - .proc_handler =3D proc_dointvec_minmax, > > - .extra1 =3D SYSCTL_ZERO, > > - .extra2 =3D &oa_sample_rate_hard_limit, > > - }, > > - {} > > + .procname =3D "oa_max_sample_rate", > > + .data =3D &i915_oa_max_sample_rate, > > + .maxlen =3D sizeof(i915_oa_max_sample_rate), > > + .mode =3D 0644, > > + .proc_handler =3D proc_dointvec_minmax, > > + .extra1 =3D SYSCTL_ZERO, > > + .extra2 =3D &oa_sample_rate_hard_limit, > > + } > > }; >=20 > The existing indentation is off, but fixing it doesn't really belong in > this patch. Agreed. But I actually was trying to fix something that checkpatch flagged. I'll change these back (which will cause this patch to be flagged). An alternative solution would be to fix the indentation as part of the preparation patches. Tell me what you think. Thx >=20 > BR, > Jani. >=20 >=20 > --=20 > Jani Nikula, Intel Open Source Graphics Center --=20 Joel Granados --avrt2cz7yepdubk6 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEErkcJVyXmMSXOyyeQupfNUreWQU8FAmSS9cQACgkQupfNUreW QU/tWQv+LHqhRfLnActmTK06NicBnR3PUYRIMank4jSVG6jtvqu/VBMNmvKyRaeA 68kGzzIEbayPbBOL1M2GmrBgIaWp9OIWt4jKQeY4ARm9DcL2FWqUqLufGoPlwjX/ 0GFjsIlBykddf6c3149Hf7D2Xz+hZyF8GgqMaIuty4hcNbIoeYs5zmwPaQmn+/q0 eoe07uBOs32ocQPIMJuRPMw6KSxHYOiWbNHxgQlIl7stObKOuvQXO2GLDgqHc13y NKMTC6XNh4VAc7JHtrsEVEBiVro3IGh7cS5U5DK0jhlSLsRfJUkXmSO4H9EwGLBq mWAl5Qr+YGnCrfE6jGc7uTM0etzscRGIlKIJ+7qcLgSfVgkqYeb5AmkZ8bvailD8 h66rr3XzwBKiQRaXpk6V7/IliqJcG7+N2yGsGJ3UXpvoF/1ieeb39kcSOFZ75BU5 USV/t5Fj0VqHetwv6dC5A8RLktlHNQZcTAXJkLL0QZ5xrmWC9kiIJ/EzJnCgJlSu AwkfgT+P =LLXc -----END PGP SIGNATURE----- --avrt2cz7yepdubk6-- --===============4772403580970488365== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Ocfs2-devel mailing list Ocfs2-devel@oss.oracle.com https://oss.oracle.com/mailman/listinfo/ocfs2-devel --===============4772403580970488365==-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 95E36EB64DC for ; Wed, 21 Jun 2023 18:42:40 +0000 (UTC) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=samsung.com header.i=@samsung.com header.a=rsa-sha256 header.s=mail20170921 header.b=KizIn4h/; dkim-atps=neutral Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4QmXRz1jlhz3cYK for ; Thu, 22 Jun 2023 04:42:39 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=samsung.com header.i=@samsung.com header.a=rsa-sha256 header.s=mail20170921 header.b=KizIn4h/; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=samsung.com (client-ip=210.118.77.12; helo=mailout2.w1.samsung.com; envelope-from=j.granados@samsung.com; receiver=lists.ozlabs.org) Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4QmP0F4LVFz30G1 for ; Wed, 21 Jun 2023 23:06:34 +1000 (AEST) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20230621130618euoutp029064a17d1e909129860c2967cf88b763~qrmmZm0i81313413134euoutp02z; Wed, 21 Jun 2023 13:06:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20230621130618euoutp029064a17d1e909129860c2967cf88b763~qrmmZm0i81313413134euoutp02z DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1687352779; bh=tF4riIzozstFHcZHBtz5SQAzztgzSEi85C6+BMxI57A=; h=Date:From:To:CC:Subject:In-Reply-To:References:From; b=KizIn4h/+VubKpimOPqcdjHWTOSNrdxhq52NIdlcN6uvcXLAB6nFiyBh7t4SmSiCP td604+vg7J45oRN7XVDY0MruktIM6Tfp+rbOoX3PpG3N0t8hckrvJWga2W8NV3jyeY H1l5Lg0B87tZSR6VD/1dW5vkoQMqYyIu+p+NXDVs= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20230621130618eucas1p26bebad0290381b6c6cb4bc9b27d122f5~qrml9OciK0200302003eucas1p2H; Wed, 21 Jun 2023 13:06:18 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id 94.F5.42423.AC5F2946; Wed, 21 Jun 2023 14:06:18 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20230621130617eucas1p2d418f189352fca58d3547c0b3c4e2078~qrmlH_Wmx0598905989eucas1p2M; Wed, 21 Jun 2023 13:06:17 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20230621130617eusmtrp1deec7a7753b1b8a355f9dfe83f8704bb~qrmlF-M1k0740407404eusmtrp1I; Wed, 21 Jun 2023 13:06:17 +0000 (GMT) X-AuditID: cbfec7f2-a3bff7000002a5b7-83-6492f5ca7091 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id F1.B8.14344.9C5F2946; Wed, 21 Jun 2023 14:06:17 +0100 (BST) Received: from CAMSVWEXC02.scsc.local (unknown [106.1.227.72]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20230621130616eusmtip17e21dd5f7eca1289642f50e5db94443d~qrmkf0BdK0234302343eusmtip1d; Wed, 21 Jun 2023 13:06:16 +0000 (GMT) Received: from localhost (106.210.248.248) by CAMSVWEXC02.scsc.local (2002:6a01:e348::6a01:e348) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 21 Jun 2023 14:06:15 +0100 Date: Wed, 21 Jun 2023 15:06:14 +0200 From: Joel Granados To: Jani Nikula Subject: Re: [PATCH 09/11] sysctl: Remove the end element in sysctl table arrays Message-ID: <20230621130614.s36w4u7dzmb5d5p3@localhost> MIME-Version: 1.0 Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="avrt2cz7yepdubk6" Content-Disposition: inline In-Reply-To: <87o7l92hg8.fsf@intel.com> X-Originating-IP: [106.210.248.248] X-ClientProxiedBy: CAMSVWEXC01.scsc.local (2002:6a01:e347::6a01:e347) To CAMSVWEXC02.scsc.local (2002:6a01:e348::6a01:e348) X-Brightmail-Tracker: H4sIAAAAAAAAA2WTe0wUVxTGc2dmZxYsmxGJXhFCimJbQeqjjUeRpk20mTaNscRgrIl1A6No EcyutEhr5CmUgsjykkfl6WJ57ALlvUArwsqCtSKUAorAgkEEedWlvLcLg61J/7n5ne+c797v /HHFpGWq2Fp8xucCL/ORetvT5lS5dvb+9maDwnNH8721UNwyTEOauoCGsCojBUHaDBEsKrQM vJx9xEDkUikFA4v1NDwc+IOGpOEgCsaVUQgeK4YYMPYMEZDT1E+ARjVGwGJVOAnG8lgSsjOn SXhWFI6gLrTEdFwvpGEseJ6CtkEJqKrDCCisWSDhe72RhvGQExCSraaho4KDkRt5CELKDAgS izdAu3KChqzOcgLSunbBrDKPAd39aQp6DXoKVOpsAoIrbxHQEJ9Cwk/KGQZ6YhIoSI4MMQVq MRBQ9jiYhqG6aAIelF8VwWB+GQPxczdJuNa8E0oGOkQwmdPMQO+TWQJqanWUKUIPAQmxplfD I9IQPM0YEcGvtekIqhcqGahPqEUw//eSCPTqceJDT653dJHiCm4UIK6to5Xk5ucUiOvWG0gu NbCV4gxd9wlubnYb97TVjYsNGWO42ukMiqtK6WG4jBI/rkNzjFuoL2a46uog5vDuL8z3e/Le Z77mZe9+cNLcK1V9hTzfZO+vbdMQgajYJhKZiTH7Hp54qqQjkbnYkr2FsC6rkBGKlwjfDu4j heIvhOeNV9ErS7E+VyQ0chHuL60j/p1qnKlZtZQhrG+JW7FQrAOeiUkQLTPNOuHfRx+Ty2zF bseFnYMrV5Hsw704vKRhxbCOdcOhWRHMMluwe/DNqWAk8FqsSx6klplk/bGq/zfTjNjEm3Du knhZNmPfwlVDi5QQdTP+sy6bFvgSbi7tXkmK2a43cGSlYrVxAOeP9TMCr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tYRFiZ56n8dePLF5Ra3riu3NbB2Vq/adOOhbyJ5N/EOU2f33pQvuWr KAGh2CMR+eFyheQfqa/esMoEAAA= X-CMS-MailID: 20230621130617eucas1p2d418f189352fca58d3547c0b3c4e2078 X-Msg-Generator: CA X-RootMTR: 20230621094824eucas1p2b6adfbd3f15ff3665674917f419b25d3 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20230621094824eucas1p2b6adfbd3f15ff3665674917f419b25d3 References: <20230621091000.424843-1-j.granados@samsung.com> <20230621094817.433842-1-j.granados@samsung.com> <87o7l92hg8.fsf@intel.com> X-Mailman-Approved-At: Thu, 22 Jun 2023 04:32:35 +1000 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Juri Lelli , Miaohe Lin , "Rafael J. Wysocki" , Catalin Marinas , dri-devel@lists.freedesktop.org, Ben Segall , linux-sctp@vger.kernel.org, ocfs2-devel@oss.oracle.com, Miquel Raynal , Alexander Gordeev , "K. Y. Srinivasan" , Stefan Schmidt , Wei Liu , Vincent Guittot , bridge@lists.linux-foundation.org, James Morris , Jozsef Kadlecsik , Eric Biggers , linux-cachefs@redhat.com, Mel Gorman , "Darrick J. Wong" , Waiman Long , Christian Borntraeger , Petr Mladek , Martin Schiller , Russ Weight , Tvrtko Ursulin , Boqun Feng , Nicholas Piggin , John Ogness , Alexander Viro , Andy Lutomirski , Remi Denis-Courmont , xen-devel@lists.xenproject.org, Thomas Gleixner , Trond Myklebust , Anton Altaparmakov , Christian Brauner , Will Drewry , Neil Horman , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, Ralf Baechle , Sergey Senozhatsky , mcgrof@kernel.org, Chuck Lever , netfilter-devel@vger.kernel.org, Masami Hiramatsu , Jiri Olsa , linux-fsdevel@vger.kernel.org, Matthieu Baerts , Andrew Morton , linux-trace-kernel@vger.kernel.org, linux-wpan@vger.kernel.org, Mark Rutland , linux-aio@kvack.org, "Jason A. Donenfeld" , linux-ia64@vger.kernel.org, Naoya Horiguchi , Dave Hansen , Clemens Ladisch , Phillip Potter , Song Liu , Eric Dumazet , keyrings@vger.kernel.org, John Stultz , Stanislav Fomichev , Jan Karcher , codalist@telemann.coda.cs.cmu.edu, linux-s390@vger.kernel.org, Valentin Schneider , Stefano Stabellini , Corey Minyard , Leon Romanovsky , Oleksandr Tyshchenko , Will Deacon , John Fastabend , Andrii Nakryiko , Anil S Keshavamurthy , Mat Martineau , Matthew Bobrowski , Julian Anastasov , coreteam@netfilter.org, Roopa Prabhu , Yonghong Song , Iurii Zaikin , Sven Schnelle , Vasily Gorbik , Mike Travis , Wenjia Zhang , Simon Horman , Xin Long , linux-arm-kernel@lists.infradead.org, fsverity@lists.linux.dev, Hao Luo , Theodore Ts'o , Stephen Boyd , Muchun Song , Florian Westphal , Robin Holt , "David S. Miller" , Jon Maloy , Jarkko Sakkinen , Eric Biederman , Anna Schumaker , Daniel Bristot de Oliveira , Mike Kravetz , Marcelo Ricardo Leitner , linux-hams@vger.kernel.org, Nikolay Aleksandrov , Joonas Lahtinen , Alexei Starovoitov , Marc Dionne , Jiri Slaby , linux-afs@lists.infradead.org, Daniel Borkmann , linux-rdma@vger.kernel.org, Dexuan Cui , "Matthew Wilcox \(Oracle\)" , lvs-devel@vger.kernel.org, coda@cs.cmu.edu, Doug Gilbert , "Naveen N. Rao" , Gerald Schaefer , Paolo Abeni , Pablo Neira Ayuso , "Serge E. Hallyn" , Kees Cook , Arnd Bergmann , Haiyang Zhang , intel-gfx@lists.freedesktop.org, Steven Rostedt , linux-crypto@vger.kernel.org, Borislav Petkov , Rodrigo Vivi , openipmi-developer@lists.sourceforge.net, mptcp@lists.linux.dev, Jan Harkes , linux-nfs@vger.kernel.org, "Martin K. Petersen" , linux-mm@kvack.org, Jeff Layton , Andy Lutomirski , linux-xfs@vger.kernel.org, linux-ntfs-dev@lists.sourceforge.net, netdev@vger.kernel.org, Ying Xue , bpf@vger.kernel.org, Sudip Mukherjee , Dietmar Eggemann , Alexander Aring , Jan Kara , Steve Wahl , Peter Zijlstra , Amir Goldstein , KP Singh , David Howells , Joseph Qi , "H. Peter Anvin" , David Airlie , Steffen Klassert , rds-devel@oss.oracle.com, Herbert Xu , linux-scsi@vger.kernel.org, dccp@vger.kernel.org, Mark Fasheh , x86@kernel.org, Russell King , Jason Gunthorpe , Ingo Molnar , Jakub Kicinski , "James E.J. Bottomley" , Joerg Reuter , linux-hyperv@vger.kernel.org, Heiko Carstens , Santosh Shilimkar , apparmor@lists.ubuntu.com, linux-raid@vger.kernel.org, Paul Moore , Juergen Gross , John Johansen , linux-x25@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, David Ahern , kexec@lists.infradead.org, linux-security-module@vger.kernel.org, Benjamin LaHaise , tipc-discussion@lists.sourceforge.net, Daniel Vetter , Martin KaFai Lau , Karsten Graul , Joel Becker Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" --avrt2cz7yepdubk6 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jun 21, 2023 at 02:16:55PM +0300, Jani Nikula wrote: > On Wed, 21 Jun 2023, Joel Granados wrote: > > Remove the empty end element from all the arrays that are passed to the > > register sysctl calls. In some files this means reducing the explicit > > array size by one. Also make sure that we are using the size in > > ctl_table_header instead of evaluating the .procname element. >=20 > Where's the harm in removing the end elements driver by driver? This is > an unwieldy patch to handle. I totally agree. Its a big one!!! but I'm concerned of breaking bisectibili= ty: * I could for example separate all the removes into separate commits and then have a final commit that removes the check for the empty element. But this will leave the tree in a state where the for loop will have undefined behavior when it looks for the empty end element. It might or might not work (probably not :) until the final commit where I fix that. * I could also change the logic that looks for the final element, commit that first and then remove the empty element one commit per driver after that. But then for all the arrays that still have an empty element, there would again be undefined behavior as it would think that the last element is valid (when it is really the sentinel). Any ideas on how to get around these? >=20 > > diff --git a/drivers/gpu/drm/i915/i915_perf.c b/drivers/gpu/drm/i915/i9= 15_perf.c > > index f43950219ffc..e4d7372afb10 100644 > > --- a/drivers/gpu/drm/i915/i915_perf.c > > +++ b/drivers/gpu/drm/i915/i915_perf.c > > @@ -4884,24 +4884,23 @@ int i915_perf_remove_config_ioctl(struct drm_de= vice *dev, void *data, > > =20 > > static struct ctl_table oa_table[] =3D { > > { > > - .procname =3D "perf_stream_paranoid", > > - .data =3D &i915_perf_stream_paranoid, > > - .maxlen =3D sizeof(i915_perf_stream_paranoid), > > - .mode =3D 0644, > > - .proc_handler =3D proc_dointvec_minmax, > > - .extra1 =3D SYSCTL_ZERO, > > - .extra2 =3D SYSCTL_ONE, > > - }, > > + .procname =3D "perf_stream_paranoid", > > + .data =3D &i915_perf_stream_paranoid, > > + .maxlen =3D sizeof(i915_perf_stream_paranoid), > > + .mode =3D 0644, > > + .proc_handler =3D proc_dointvec_minmax, > > + .extra1 =3D SYSCTL_ZERO, > > + .extra2 =3D SYSCTL_ONE, > > + }, > > { > > - .procname =3D "oa_max_sample_rate", > > - .data =3D &i915_oa_max_sample_rate, > > - .maxlen =3D sizeof(i915_oa_max_sample_rate), > > - .mode =3D 0644, > > - .proc_handler =3D proc_dointvec_minmax, > > - .extra1 =3D SYSCTL_ZERO, > > - .extra2 =3D &oa_sample_rate_hard_limit, > > - }, > > - {} > > + .procname =3D "oa_max_sample_rate", > > + .data =3D &i915_oa_max_sample_rate, > > + .maxlen =3D sizeof(i915_oa_max_sample_rate), > > + .mode =3D 0644, > > + .proc_handler =3D proc_dointvec_minmax, > > + .extra1 =3D SYSCTL_ZERO, > > + .extra2 =3D &oa_sample_rate_hard_limit, > > + } > > }; >=20 > The existing indentation is off, but fixing it doesn't really belong in > this patch. Agreed. But I actually was trying to fix something that checkpatch flagged. I'll change these back (which will cause this patch to be flagged). An alternative solution would be to fix the indentation as part of the preparation patches. Tell me what you think. Thx >=20 > BR, > Jani. >=20 >=20 > --=20 > Jani Nikula, Intel Open Source Graphics Center --=20 Joel Granados --avrt2cz7yepdubk6 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEErkcJVyXmMSXOyyeQupfNUreWQU8FAmSS9cQACgkQupfNUreW QU/tWQv+LHqhRfLnActmTK06NicBnR3PUYRIMank4jSVG6jtvqu/VBMNmvKyRaeA 68kGzzIEbayPbBOL1M2GmrBgIaWp9OIWt4jKQeY4ARm9DcL2FWqUqLufGoPlwjX/ 0GFjsIlBykddf6c3149Hf7D2Xz+hZyF8GgqMaIuty4hcNbIoeYs5zmwPaQmn+/q0 eoe07uBOs32ocQPIMJuRPMw6KSxHYOiWbNHxgQlIl7stObKOuvQXO2GLDgqHc13y NKMTC6XNh4VAc7JHtrsEVEBiVro3IGh7cS5U5DK0jhlSLsRfJUkXmSO4H9EwGLBq mWAl5Qr+YGnCrfE6jGc7uTM0etzscRGIlKIJ+7qcLgSfVgkqYeb5AmkZ8bvailD8 h66rr3XzwBKiQRaXpk6V7/IliqJcG7+N2yGsGJ3UXpvoF/1ieeb39kcSOFZ75BU5 USV/t5Fj0VqHetwv6dC5A8RLktlHNQZcTAXJkLL0QZ5xrmWC9kiIJ/EzJnCgJlSu AwkfgT+P =LLXc -----END PGP SIGNATURE----- --avrt2cz7yepdubk6-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C0488EB64DB for ; Thu, 22 Jun 2023 07:32:49 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3190410E4E3; Thu, 22 Jun 2023 07:32:31 +0000 (UTC) Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7ED9710E46E; Wed, 21 Jun 2023 13:06:21 +0000 (UTC) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20230621130618euoutp029d7307487d761f7bf2f8f6f0c9e5bc6d~qrmmZaJYP1283412834euoutp024; Wed, 21 Jun 2023 13:06:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20230621130618euoutp029d7307487d761f7bf2f8f6f0c9e5bc6d~qrmmZaJYP1283412834euoutp024 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1687352779; bh=tF4riIzozstFHcZHBtz5SQAzztgzSEi85C6+BMxI57A=; h=Date:From:To:CC:Subject:In-Reply-To:References:From; b=KizIn4h/+VubKpimOPqcdjHWTOSNrdxhq52NIdlcN6uvcXLAB6nFiyBh7t4SmSiCP td604+vg7J45oRN7XVDY0MruktIM6Tfp+rbOoX3PpG3N0t8hckrvJWga2W8NV3jyeY H1l5Lg0B87tZSR6VD/1dW5vkoQMqYyIu+p+NXDVs= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20230621130618eucas1p24a0ecfda837a4bd159368de20c0d1f69~qrml_A2lL0200602006eucas1p2B; Wed, 21 Jun 2023 13:06:18 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id 84.F5.42423.AC5F2946; Wed, 21 Jun 2023 14:06:18 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20230621130617eucas1p2525f138d93e3e4d0385cda670558b863~qrmlJMDn80596505965eucas1p2T; Wed, 21 Jun 2023 13:06:17 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20230621130617eusmtrp157908a4e096267c8ad2bfbaa7ff6b47e~qrmlGGTkZ0857208572eusmtrp1W; Wed, 21 Jun 2023 13:06:17 +0000 (GMT) X-AuditID: cbfec7f2-a51ff7000002a5b7-82-6492f5ca367b Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id F1.B8.14344.9C5F2946; Wed, 21 Jun 2023 14:06:17 +0100 (BST) Received: from CAMSVWEXC02.scsc.local (unknown [106.1.227.72]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20230621130616eusmtip17e21dd5f7eca1289642f50e5db94443d~qrmkf0BdK0234302343eusmtip1d; Wed, 21 Jun 2023 13:06:16 +0000 (GMT) Received: from localhost (106.210.248.248) by CAMSVWEXC02.scsc.local (2002:6a01:e348::6a01:e348) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 21 Jun 2023 14:06:15 +0100 Date: Wed, 21 Jun 2023 15:06:14 +0200 From: Joel Granados To: Jani Nikula Subject: Re: [PATCH 09/11] sysctl: Remove the end element in sysctl table arrays Message-ID: <20230621130614.s36w4u7dzmb5d5p3@localhost> MIME-Version: 1.0 Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="avrt2cz7yepdubk6" Content-Disposition: inline In-Reply-To: <87o7l92hg8.fsf@intel.com> X-Originating-IP: [106.210.248.248] X-ClientProxiedBy: CAMSVWEXC01.scsc.local (2002:6a01:e347::6a01:e347) To CAMSVWEXC02.scsc.local (2002:6a01:e348::6a01:e348) X-Brightmail-Tracker: H4sIAAAAAAAAA2VTaUwUZxjuNzM7s6LQAWz8RJomC0pEQDE2vrbV1IhkPEirtmliWnErU7Ry ZRfrVWXlZgFZFxRYkMtyCFsQXDegViwiLKKILg0IXiBoQbrcroBggaGtSf89x/u8eZ8v+cSk T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L8+JIaJ25vMyP3XRwv3nO68jCWYBN91 T5/nKFG5twq58Cj+GkrfX8RxsBtfg6gJa6hT96b0kw84TnanXrSrSBWax/aMI6qoqRZ3XoyI OlGS/7KL4C+n/j55+iWT/JVUy2gv7uBF/FVUWaeF4zDg/OZgKv2vNtJRcOdvo9IvHOE62JUf RGmeHkLO1D8QZb3QQjgLr1MNP1leMs5PpjJum1kDj+XFVNEszyG78H2oqkE74Rz1Larj5kXS yQeoCfufKAu5576SlPtKUu5/SU7Zj+qcHcL+J6+gCs+P4E4OpXQ6K3EOcUvQIiZJER8brwgU KiTxiiRprHC3LL4SsVtzxTRtuIaKh8eFNQjjoRr0NuvsryhtRV6EVCZlBItcl1SqY9xcYyT7 Uhi5LEqeFMcoapCY/cZs3Mtjt4xdQWlilGhtgFi0Zm1wgDh47WqBp2t4whGJGz9Wksh8yzAJ jPxfH8Zz8VJiZ2NX1RkPLqyOXNKOKbsT7kUdOJwaOhM9aXEJ8857tkw8lSneeKbn1MSNhI/D l3oOPaxuCesMMPXuPO5htjARme8ZePuCLlvMn260Dezvur1yV6NldPhSdruvWr8dK530/PHX z0QnIlWGkXe//+COPmWpz5YNIz7vNH0dqqnWbt6eY/d/v2/plorxH5BdMb+A52lYn+aLfOoC Dm5+7vs4hZzu8NKE6D9ZybW+SNXcuEYujvLDVcc8Dp65Zp/8MqkgYr7RNNAcrZPOdhm/Kba8 tqwvWpAT3lq+YPGKTEtYRFiZ56n8dePLF5Ra3riu3NbB2Vq/adOOhbyJ5N/EOU2f33pQvuWr KAGh2CMR+eFyheQfqa/esMoEAAA= X-CMS-MailID: 20230621130617eucas1p2525f138d93e3e4d0385cda670558b863 X-Msg-Generator: CA X-RootMTR: 20230621094824eucas1p2b6adfbd3f15ff3665674917f419b25d3 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20230621094824eucas1p2b6adfbd3f15ff3665674917f419b25d3 References: <20230621091000.424843-1-j.granados@samsung.com> <20230621094817.433842-1-j.granados@samsung.com> <87o7l92hg8.fsf@intel.com> X-Mailman-Approved-At: Thu, 22 Jun 2023 07:32:28 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Juri Lelli , Miaohe Lin , "Rafael J. Wysocki" , Catalin Marinas , dri-devel@lists.freedesktop.org, Ben Segall , linux-sctp@vger.kernel.org, ocfs2-devel@oss.oracle.com, Miquel Raynal , Alexander Gordeev , "K. Y. Srinivasan" , Stefan Schmidt , Wei Liu , Vincent Guittot , Michael Ellerman , bridge@lists.linux-foundation.org, James Morris , Christophe Leroy , Jozsef Kadlecsik , Eric Biggers , linux-cachefs@redhat.com, Mel Gorman , "Darrick J. Wong" , Waiman Long , Christian Borntraeger , Petr Mladek , Martin Schiller , Russ Weight , Tvrtko Ursulin , Boqun Feng , Nicholas Piggin , John Ogness , Alexander Viro , Andy Lutomirski , Remi Denis-Courmont , xen-devel@lists.xenproject.org, Thomas Gleixner , Trond Myklebust , Anton Altaparmakov , Christian Brauner , Will Drewry , Neil Horman , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, Ralf Baechle , Sergey Senozhatsky , mcgrof@kernel.org, Chuck Lever , netfilter-devel@vger.kernel.org, Masami Hiramatsu , Jiri Olsa , linux-fsdevel@vger.kernel.org, Matthieu Baerts , Andrew Morton , linux-trace-kernel@vger.kernel.org, linux-wpan@vger.kernel.org, Mark Rutland , linux-aio@kvack.org, "Jason A. Donenfeld" , linux-ia64@vger.kernel.org, Naoya Horiguchi , Dave Hansen , Clemens Ladisch , Phillip Potter , Song Liu , Eric Dumazet , keyrings@vger.kernel.org, John Stultz , Stanislav Fomichev , Jan Karcher , codalist@telemann.coda.cs.cmu.edu, linux-s390@vger.kernel.org, Valentin Schneider , Stefano Stabellini , Corey Minyard , Leon Romanovsky , Oleksandr Tyshchenko , Will Deacon , John Fastabend , Andrii Nakryiko , Anil S Keshavamurthy , Mat Martineau , Matthew Bobrowski , Julian Anastasov , coreteam@netfilter.org, Roopa Prabhu , Yonghong Song , Iurii Zaikin , Sven Schnelle , Vasily Gorbik , Mike Travis , Wenjia Zhang , Simon Horman , Xin Long , linux-arm-kernel@lists.infradead.org, fsverity@lists.linux.dev, Hao Luo , Theodore Ts'o , Stephen Boyd , Muchun Song , Florian Westphal , Robin Holt , "David S. Miller" , Jon Maloy , Jarkko Sakkinen , Eric Biederman , Anna Schumaker , Daniel Bristot de Oliveira , Mike Kravetz , Marcelo Ricardo Leitner , linux-hams@vger.kernel.org, Nikolay Aleksandrov , Alexei Starovoitov , Marc Dionne , Jiri Slaby , linux-afs@lists.infradead.org, Daniel Borkmann , linux-rdma@vger.kernel.org, Dexuan Cui , "Matthew Wilcox \(Oracle\)" , lvs-devel@vger.kernel.org, coda@cs.cmu.edu, Doug Gilbert , "Naveen N. Rao" , Gerald Schaefer , Paolo Abeni , Pablo Neira Ayuso , "Serge E. Hallyn" , Kees Cook , Arnd Bergmann , Haiyang Zhang , intel-gfx@lists.freedesktop.org, Steven Rostedt , linux-crypto@vger.kernel.org, Borislav Petkov , Rodrigo Vivi , openipmi-developer@lists.sourceforge.net, mptcp@lists.linux.dev, Jan Harkes , linux-nfs@vger.kernel.org, "Martin K. Petersen" , linux-mm@kvack.org, Jeff Layton , Andy Lutomirski , linux-xfs@vger.kernel.org, linux-ntfs-dev@lists.sourceforge.net, netdev@vger.kernel.org, Ying Xue , bpf@vger.kernel.org, Sudip Mukherjee , Dietmar Eggemann , Alexander Aring , Jan Kara , Steve Wahl , Peter Zijlstra , Balbir Singh , Amir Goldstein , KP Singh , David Howells , Joseph Qi , "H. Peter Anvin" , Steffen Klassert , rds-devel@oss.oracle.com, Herbert Xu , linux-scsi@vger.kernel.org, dccp@vger.kernel.org, Mark Fasheh , x86@kernel.org, Russell King , Jason Gunthorpe , Ingo Molnar , Jakub Kicinski , "James E.J. Bottomley" , Joerg Reuter , linux-hyperv@vger.kernel.org, Heiko Carstens , Santosh Shilimkar , apparmor@lists.ubuntu.com, linux-raid@vger.kernel.org, Paul Moore , Juergen Gross , John Johansen , linux-x25@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, David Ahern , kexec@lists.infradead.org, linux-security-module@vger.kernel.org, Benjamin LaHaise , tipc-discussion@lists.sourceforge.net, Martin KaFai Lau , Karsten Graul , Joel Becker Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" --avrt2cz7yepdubk6 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jun 21, 2023 at 02:16:55PM +0300, Jani Nikula wrote: > On Wed, 21 Jun 2023, Joel Granados wrote: > > Remove the empty end element from all the arrays that are passed to the > > register sysctl calls. In some files this means reducing the explicit > > array size by one. Also make sure that we are using the size in > > ctl_table_header instead of evaluating the .procname element. >=20 > Where's the harm in removing the end elements driver by driver? This is > an unwieldy patch to handle. I totally agree. Its a big one!!! but I'm concerned of breaking bisectibili= ty: * I could for example separate all the removes into separate commits and then have a final commit that removes the check for the empty element. But this will leave the tree in a state where the for loop will have undefined behavior when it looks for the empty end element. It might or might not work (probably not :) until the final commit where I fix that. * I could also change the logic that looks for the final element, commit that first and then remove the empty element one commit per driver after that. But then for all the arrays that still have an empty element, there would again be undefined behavior as it would think that the last element is valid (when it is really the sentinel). Any ideas on how to get around these? >=20 > > diff --git a/drivers/gpu/drm/i915/i915_perf.c b/drivers/gpu/drm/i915/i9= 15_perf.c > > index f43950219ffc..e4d7372afb10 100644 > > --- a/drivers/gpu/drm/i915/i915_perf.c > > +++ b/drivers/gpu/drm/i915/i915_perf.c > > @@ -4884,24 +4884,23 @@ int i915_perf_remove_config_ioctl(struct drm_de= vice *dev, void *data, > > =20 > > static struct ctl_table oa_table[] =3D { > > { > > - .procname =3D "perf_stream_paranoid", > > - .data =3D &i915_perf_stream_paranoid, > > - .maxlen =3D sizeof(i915_perf_stream_paranoid), > > - .mode =3D 0644, > > - .proc_handler =3D proc_dointvec_minmax, > > - .extra1 =3D SYSCTL_ZERO, > > - .extra2 =3D SYSCTL_ONE, > > - }, > > + .procname =3D "perf_stream_paranoid", > > + .data =3D &i915_perf_stream_paranoid, > > + .maxlen =3D sizeof(i915_perf_stream_paranoid), > > + .mode =3D 0644, > > + .proc_handler =3D proc_dointvec_minmax, > > + .extra1 =3D SYSCTL_ZERO, > > + .extra2 =3D SYSCTL_ONE, > > + }, > > { > > - .procname =3D "oa_max_sample_rate", > > - .data =3D &i915_oa_max_sample_rate, > > - .maxlen =3D sizeof(i915_oa_max_sample_rate), > > - .mode =3D 0644, > > - .proc_handler =3D proc_dointvec_minmax, > > - .extra1 =3D SYSCTL_ZERO, > > - .extra2 =3D &oa_sample_rate_hard_limit, > > - }, > > - {} > > + .procname =3D "oa_max_sample_rate", > > + .data =3D &i915_oa_max_sample_rate, > > + .maxlen =3D sizeof(i915_oa_max_sample_rate), > > + .mode =3D 0644, > > + .proc_handler =3D proc_dointvec_minmax, > > + .extra1 =3D SYSCTL_ZERO, > > + .extra2 =3D &oa_sample_rate_hard_limit, > > + } > > }; >=20 > The existing indentation is off, but fixing it doesn't really belong in > this patch. Agreed. But I actually was trying to fix something that checkpatch flagged. I'll change these back (which will cause this patch to be flagged). An alternative solution would be to fix the indentation as part of the preparation patches. Tell me what you think. Thx >=20 > BR, > Jani. >=20 >=20 > --=20 > Jani Nikula, Intel Open Source Graphics Center --=20 Joel Granados --avrt2cz7yepdubk6 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEErkcJVyXmMSXOyyeQupfNUreWQU8FAmSS9cQACgkQupfNUreW QU/tWQv+LHqhRfLnActmTK06NicBnR3PUYRIMank4jSVG6jtvqu/VBMNmvKyRaeA 68kGzzIEbayPbBOL1M2GmrBgIaWp9OIWt4jKQeY4ARm9DcL2FWqUqLufGoPlwjX/ 0GFjsIlBykddf6c3149Hf7D2Xz+hZyF8GgqMaIuty4hcNbIoeYs5zmwPaQmn+/q0 eoe07uBOs32ocQPIMJuRPMw6KSxHYOiWbNHxgQlIl7stObKOuvQXO2GLDgqHc13y NKMTC6XNh4VAc7JHtrsEVEBiVro3IGh7cS5U5DK0jhlSLsRfJUkXmSO4H9EwGLBq mWAl5Qr+YGnCrfE6jGc7uTM0etzscRGIlKIJ+7qcLgSfVgkqYeb5AmkZ8bvailD8 h66rr3XzwBKiQRaXpk6V7/IliqJcG7+N2yGsGJ3UXpvoF/1ieeb39kcSOFZ75BU5 USV/t5Fj0VqHetwv6dC5A8RLktlHNQZcTAXJkLL0QZ5xrmWC9kiIJ/EzJnCgJlSu AwkfgT+P =LLXc -----END PGP SIGNATURE----- --avrt2cz7yepdubk6--