Re: [PATCH 01/13] sysctl: add new register_sysctl_subdir() helper

From: Jani Nikula
Date: Fri May 29 2020 - 04:13:37 EST


On Fri, 29 May 2020, Luis Chamberlain <mcgrof@xxxxxxxxxx> wrote:
> Often enough all we need to do is create a subdirectory so that
> we can stuff sysctls underneath it. However, *if* that directory
> was already created early on the boot sequence we really have no
> need to use the full boiler plate code for it, we can just use
> local variables to help us guide sysctl to place the new leaf files.

I find it hard to figure out the lifetime requirements for the tables
passed in; when it's okay to use local variables and when you need
longer lifetimes. It's not documented, everyone appears to be using
static tables for this. It's far from obvious.

BR,
Jani.


--
Jani Nikula, Intel Open Source Graphics Center