Re: [PATCH 09/11] sysctl: Remove the end element in sysctl table arrays
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: Joel Granados <j.granados@xxxxxxxxxxx>, mcgrof@xxxxxxxxxx, Russell King <linux@xxxxxxxxxxxxxxx>, Catalin Marinas <catalin.marinas@xxxxxxx>, Will Deacon <will@xxxxxxxxxx>, Michael Ellerman <mpe@xxxxxxxxxxxxxx>, Heiko Carstens <hca@xxxxxxxxxxxxx>, Vasily Gorbik <gor@xxxxxxxxxxxxx>, Alexander Gordeev <agordeev@xxxxxxxxxxxxx>, Gerald Schaefer <gerald.schaefer@xxxxxxxxxxxxx>, Andy Lutomirski <luto@xxxxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>, Borislav Petkov <bp@xxxxxxxxx>, Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>, x86@xxxxxxxxxx, Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>, "David S. Miller" <davem@xxxxxxxxxxxxx>, Russ Weight <russell.h.weight@xxxxxxxxx>, Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>, Phillip Potter <phil@xxxxxxxxxxxxxxxx>, Clemens Ladisch <clemens@xxxxxxxxxx>, Arnd Bergmann <arnd@xxxxxxxx>, Corey Minyard <minyard@xxxxxxx>, "Theodore Ts'o" <tytso@xxxxxxx>, "Jason A. Donenfeld" <Jason@xxxxxxxxx>, Joonas Lahtinen <joonas.lahtinen@xxxxxxxxxxxxxxx>, Rodrigo Vivi <rodrigo.vivi@xxxxxxxxx>, Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxxxxxxxx>, David Airlie <airlied@xxxxxxxxx>, Daniel Vetter <daniel@xxxxxxxx>, "K. Y. Srinivasan" <kys@xxxxxxxxxxxxx>, Haiyang Zhang <haiyangz@xxxxxxxxxxxxx>, Wei Liu <wei.liu@xxxxxxxxxx>, Dexuan Cui <decui@xxxxxxxxxxxxx>, Jason Gunthorpe <jgg@xxxxxxxx>, Leon Romanovsky <leon@xxxxxxxxxx>, Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>, Song Liu <song@xxxxxxxxxx>, Robin Holt <robinmholt@xxxxxxxxx>, Steve Wahl <steve.wahl@xxxxxxx>, David Ahern <dsahern@xxxxxxxxxx>, Eric Dumazet <edumazet@xxxxxxxxxx>, Jakub Kicinski <kuba@xxxxxxxxxx>, Paolo Abeni <pabeni@xxxxxxxxxx>, Sudip Mukherjee <sudipm.mukherjee@xxxxxxxxx>, Mark Rutland <mark.rutland@xxxxxxx>, "James E.J. Bottomley" <jejb@xxxxxxxxxxxxx>, "Martin K. Petersen" <martin.petersen@xxxxxxxxxx>, Doug Gilbert <dgilbert@xxxxxxxxxxxx>, Jiri Slaby <jirislaby@xxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Alexander Viro <viro@xxxxxxxxxxxxxxxxxx>, Christian Brauner <brauner@xxxxxxxxxx>, Benjamin LaHaise <bcrl@xxxxxxxxx>, David Howells <dhowells@xxxxxxxxxx>, Jan Harkes <jaharkes@xxxxxxxxxx>, coda@xxxxxxxxxx, Trond Myklebust <trond.myklebust@xxxxxxxxxxxxxxx>, Anna Schumaker <anna@xxxxxxxxxx>, Chuck Lever <chuck.lever@xxxxxxxxxx>, Jeff Layton <jlayton@xxxxxxxxxx>, Jan Kara <jack@xxxxxxx>, Anton Altaparmakov <anton@xxxxxxxxxx>, Mark Fasheh <mark@xxxxxxxxxx>, Joel Becker <jlbec@xxxxxxxxxxxx>, Joseph Qi <joseph.qi@xxxxxxxxxxxxxxxxx>, Kees Cook <keescook@xxxxxxxxxxxx>, Iurii Zaikin <yzaikin@xxxxxxxxxx>, Eric Biggers <ebiggers@xxxxxxxxxx>, "Darrick J. Wong" <djwong@xxxxxxxxxx>, Alexei Starovoitov <ast@xxxxxxxxxx>, Daniel Borkmann <daniel@xxxxxxxxxxxxx>, Andrii Nakryiko <andrii@xxxxxxxxxx>, Balbir Singh <bsingharora@xxxxxxxxx>, Eric Biederman <ebiederm@xxxxxxxxxxxx>, "Naveen N. Rao" <naveen.n.rao@xxxxxxxxxxxxx>, Anil S Keshavamurthy <anil.s.keshavamurthy@xxxxxxxxx>, Masami Hiramatsu <mhiramat@xxxxxxxxxx>, Peter Zijlstra <peterz@xxxxxxxxxxxxx>, Petr Mladek <pmladek@xxxxxxxx>, Sergey Senozhatsky <senozhatsky@xxxxxxxxxxxx>, Juri Lelli <juri.lelli@xxxxxxxxxx>, Vincent Guittot <vincent.guittot@xxxxxxxxxx>, John Stultz <jstultz@xxxxxxxxxx>, Steven Rostedt <rostedt@xxxxxxxxxxx>, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, Mike Kravetz <mike.kravetz@xxxxxxxxxx>, Muchun Song <muchun.song@xxxxxxxxx>, Naoya Horiguchi <naoya.horiguchi@xxxxxxx>, "Matthew Wilcox (Oracle)" <willy@xxxxxxxxxxxxx>, Joerg Reuter <jreuter@xxxxxxxx>, Ralf Baechle <ralf@xxxxxxxxxxxxxx>, Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx>, Jozsef Kadlecsik <kadlec@xxxxxxxxxxxxx>, Florian Westphal <fw@xxxxxxxxx>, Roopa Prabhu <roopa@xxxxxxxxxx>, Nikolay Aleksandrov <razor@xxxxxxxxxxxxx>, Alexander Aring <alex.aring@xxxxxxxxx>, Stefan Schmidt <stefan@xxxxxxxxxxxxxxxxxx>, Miquel Raynal <miquel.raynal@xxxxxxxxxxx>, Steffen Klassert <steffen.klassert@xxxxxxxxxxx>, Matthieu Baerts <matthieu.baerts@xxxxxxxxxxxx>, Mat Martineau <martineau@xxxxxxxxxx>, Simon Horman <horms@xxxxxxxxxxxx>, Julian Anastasov <ja@xxxxxx>, Remi Denis-Courmont <courmisch@xxxxxxxxx>, Santosh Shilimkar <santosh.shilimkar@xxxxxxxxxx>, Marc Dionne <marc.dionne@xxxxxxxxxxxx>, Neil Horman <nhorman@xxxxxxxxxxxxx>, Marcelo Ricardo Leitner <marcelo.leitner@xxxxxxxxx>, Xin Long <lucien.xin@xxxxxxxxx>, Karsten Graul <kgraul@xxxxxxxxxxxxx>, Wenjia Zhang <wenjia@xxxxxxxxxxxxx>, Jan Karcher <jaka@xxxxxxxxxxxxx>, Jon Maloy <jmaloy@xxxxxxxxxx>, Ying Xue <ying.xue@xxxxxxxxxxxxx>, Martin Schiller <ms@xxxxxxxxxx>, John Johansen <john.johansen@xxxxxxxxxxxxx>, Paul Moore <paul@xxxxxxxxxxxxxx>, James Morris <jmorris@xxxxxxxxx>, "Serge E. Hallyn" <serge@xxxxxxxxxx>, Jarkko Sakkinen <jarkko@xxxxxxxxxx>
- Subject: Re: [PATCH 09/11] sysctl: Remove the end element in sysctl table arrays
- From: Jani Nikula <jani.nikula@xxxxxxxxxxxxxxx>
- Date: Wed, 21 Jun 2023 14:16:55 +0300
- Cc: Joel Granados <j.granados@xxxxxxxxxxx>, Nicholas Piggin <npiggin@xxxxxxxxx>, Christophe Leroy <christophe.leroy@xxxxxxxxxx>, Christian Borntraeger <borntraeger@xxxxxxxxxxxxx>, Sven Schnelle <svens@xxxxxxxxxxxxx>, "H. Peter Anvin" <hpa@xxxxxxxxx>, "Rafael J. Wysocki" <rafael@xxxxxxxxxx>, Mike Travis <mike.travis@xxxxxxx>, Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>, Amir Goldstein <amir73il@xxxxxxxxx>, Matthew Bobrowski <repnop@xxxxxxxxxx>, John Fastabend <john.fastabend@xxxxxxxxx>, Martin KaFai Lau <martin.lau@xxxxxxxxx>, Yonghong Song <yhs@xxxxxx>, KP Singh <kpsingh@xxxxxxxxxx>, Stanislav Fomichev <sdf@xxxxxxxxxx>, Hao Luo <haoluo@xxxxxxxxxx>, Jiri Olsa <jolsa@xxxxxxxxxx>, Waiman Long <longman@xxxxxxxxxx>, Boqun Feng <boqun.feng@xxxxxxxxx>, John Ogness <john.ogness@xxxxxxxxxxxxx>, Dietmar Eggemann <dietmar.eggemann@xxxxxxx>, Ben Segall <bsegall@xxxxxxxxxx>, Mel Gorman <mgorman@xxxxxxx>, Daniel Bristot de Oliveira <bristot@xxxxxxxxxx>, Valentin Schneider <vschneid@xxxxxxxxxx>, Andy Lutomirski <luto@xxxxxxxxxxxxxx>, Will Drewry <wad@xxxxxxxxxxxx>, Stephen Boyd <sboyd@xxxxxxxxxx>, Miaohe Lin <linmiaohe@xxxxxxxxxx>, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, linux-ia64@xxxxxxxxxxxxxxx, linuxppc-dev@xxxxxxxxxxxxxxxx, linux-s390@xxxxxxxxxxxxxxx, linux-crypto@xxxxxxxxxxxxxxx, openipmi-developer@xxxxxxxxxxxxxxxxxxxxx, intel-gfx@xxxxxxxxxxxxxxxxxxxxx, dri-devel@xxxxxxxxxxxxxxxxxxxxx, linux-hyperv@xxxxxxxxxxxxxxx, linux-rdma@xxxxxxxxxxxxxxx, linux-raid@xxxxxxxxxxxxxxx, netdev@xxxxxxxxxxxxxxx, linux-scsi@xxxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx, linux-aio@xxxxxxxxx, linux-cachefs@xxxxxxxxxx, codalist@xxxxxxxxxxxxxxxxxxxxxxxx, linux-mm@xxxxxxxxx, linux-nfs@xxxxxxxxxxxxxxx, linux-ntfs-dev@xxxxxxxxxxxxxxxxxxxxx, ocfs2-devel@xxxxxxxxxxxxxx, fsverity@xxxxxxxxxxxxxxx, linux-xfs@xxxxxxxxxxxxxxx, bpf@xxxxxxxxxxxxxxx, kexec@xxxxxxxxxxxxxxxxxxx, linux-trace-kernel@xxxxxxxxxxxxxxx, linux-hams@xxxxxxxxxxxxxxx, netfilter-devel@xxxxxxxxxxxxxxx, coreteam@xxxxxxxxxxxxx, bridge@xxxxxxxxxxxxxxxxxxxxxxxxxx, dccp@xxxxxxxxxxxxxxx, linux-wpan@xxxxxxxxxxxxxxx, mptcp@xxxxxxxxxxxxxxx, lvs-devel@xxxxxxxxxxxxxxx, rds-devel@xxxxxxxxxxxxxx, linux-afs@xxxxxxxxxxxxxxxxxxx, linux-sctp@xxxxxxxxxxxxxxx, tipc-discussion@xxxxxxxxxxxxxxxxxxxxx, linux-x25@xxxxxxxxxxxxxxx, apparmor@xxxxxxxxxxxxxxxx, linux-security-module@xxxxxxxxxxxxxxx, keyrings@xxxxxxxxxxxxxxx
- In-reply-to: <20230621094817.433842-1-j.granados@samsung.com>
- Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo
- References: <20230621091000.424843-1-j.granados@samsung.com> <CGME20230621094824eucas1p2b6adfbd3f15ff3665674917f419b25d3@eucas1p2.samsung.com> <20230621094817.433842-1-j.granados@samsung.com>
On Wed, 21 Jun 2023, Joel Granados <j.granados@xxxxxxxxxxx> 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.
Where's the harm in removing the end elements driver by driver? This is
an unwieldy patch to handle.
> diff --git a/drivers/gpu/drm/i915/i915_perf.c b/drivers/gpu/drm/i915/i915_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_device *dev, void *data,
>
> static struct ctl_table oa_table[] = {
> {
> - .procname = "perf_stream_paranoid",
> - .data = &i915_perf_stream_paranoid,
> - .maxlen = sizeof(i915_perf_stream_paranoid),
> - .mode = 0644,
> - .proc_handler = proc_dointvec_minmax,
> - .extra1 = SYSCTL_ZERO,
> - .extra2 = SYSCTL_ONE,
> - },
> + .procname = "perf_stream_paranoid",
> + .data = &i915_perf_stream_paranoid,
> + .maxlen = sizeof(i915_perf_stream_paranoid),
> + .mode = 0644,
> + .proc_handler = proc_dointvec_minmax,
> + .extra1 = SYSCTL_ZERO,
> + .extra2 = SYSCTL_ONE,
> + },
> {
> - .procname = "oa_max_sample_rate",
> - .data = &i915_oa_max_sample_rate,
> - .maxlen = sizeof(i915_oa_max_sample_rate),
> - .mode = 0644,
> - .proc_handler = proc_dointvec_minmax,
> - .extra1 = SYSCTL_ZERO,
> - .extra2 = &oa_sample_rate_hard_limit,
> - },
> - {}
> + .procname = "oa_max_sample_rate",
> + .data = &i915_oa_max_sample_rate,
> + .maxlen = sizeof(i915_oa_max_sample_rate),
> + .mode = 0644,
> + .proc_handler = proc_dointvec_minmax,
> + .extra1 = SYSCTL_ZERO,
> + .extra2 = &oa_sample_rate_hard_limit,
> + }
> };
The existing indentation is off, but fixing it doesn't really belong in
this patch.
BR,
Jani.
--
Jani Nikula, Intel Open Source Graphics Center
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]