Re: [PATCH sysctl-next 1/2] sysctl: collapse redundant CONFIG_SYSCTL nesting in kernel/sysctl.c

From: Joel Granados

Date: Tue Aug 11 2026 - 08:56:22 EST


On Mon, Aug 10, 2026 at 02:24:53PM +0200, Oleg Nesterov wrote:
> On 08/10, Joel Granados wrote:
> >
> > This looks very nice, but now that you are there, I would propose an
> > additional change:
> >
> > 1. I would move the proc_do_static_key function and the definition of
> > the sysctl_subsys_table into the first CONFIG_SYSCTL definition
> > section; right after proc_do_large_bitmap
> >
> > 2. Doing one means that there is only one #ifdef CONFIG_SYSCTL
> >
> > 3. Add a proc_do_static_key stub to the #else section; something like
> > this:
> >
> > int proc_do_static_key(const struct ctl_table *table, int dir,
> > void *buffer, size_t *lenp, loff_t *ppos)
> > {
> > return -ENOSYS;
> > }
>
> Yeees, and I thought about this too ;) Just I decided to send the
> minimal and trivial cleanup. Except right now I am not 100% sure
> about 3. because I can't read the source code now...
>
> Again, I'd be happy to send V2, but only after I return from PTO on
> Aug 19.

No worries. Send it when you get back, no hurry.

>
> But let me ask... Do you want me to incorporate this additional change
> into 1/2 or send it as a separate change? I'd prefer the latter, but
> I am fine either way.

I have no preference. Up to you. Send it and then we will take it from
there.

Best

Attachment: signature.asc
Description: PGP signature