Calls to __register_sysctl_table will be validated by
scripts/check-sysctl-docs. As this script is line-based remove the
linebreak which would confuse the script.
Signed-off-by: Thomas Weißschuh <[email protected]>
---
ipc/ipc_sysctl.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/ipc/ipc_sysctl.c b/ipc/ipc_sysctl.c
index 8c62e443f78b..e4008288a3ba 100644
--- a/ipc/ipc_sysctl.c
+++ b/ipc/ipc_sysctl.c
@@ -259,8 +259,7 @@ bool setup_ipc_sysctls(struct ipc_namespace *ns)
tbl[i].data = NULL;
}
- ns->ipc_sysctls = __register_sysctl_table(&ns->ipc_set,
- "kernel", tbl,
+ ns->ipc_sysctls = __register_sysctl_table(&ns->ipc_set, "kernel", tbl,
ARRAY_SIZE(ipc_sysctls));
}
if (!ns->ipc_sysctls) {
--
2.43.2
On Mon, Feb 19, 2024 at 09:19:23PM +0100, Thomas Wei?schuh wrote:
> Calls to __register_sysctl_table will be validated by
> scripts/check-sysctl-docs. As this script is line-based remove the
> linebreak which would confuse the script.
>
> Signed-off-by: Thomas Wei?schuh <[email protected]>
> ---
> ipc/ipc_sysctl.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/ipc/ipc_sysctl.c b/ipc/ipc_sysctl.c
> index 8c62e443f78b..e4008288a3ba 100644
> --- a/ipc/ipc_sysctl.c
> +++ b/ipc/ipc_sysctl.c
> @@ -259,8 +259,7 @@ bool setup_ipc_sysctls(struct ipc_namespace *ns)
> tbl[i].data = NULL;
> }
>
> - ns->ipc_sysctls = __register_sysctl_table(&ns->ipc_set,
> - "kernel", tbl,
> + ns->ipc_sysctls = __register_sysctl_table(&ns->ipc_set, "kernel", tbl,
> ARRAY_SIZE(ipc_sysctls));
> }
> if (!ns->ipc_sysctls) {
This is very interesting and points to a bigger issue with the
check-sysctl-docs: which is that the AWK record separator is "\n" and it
require that the lines being analyzed follow a strict pattern; even if
that meant having a loooong line (not the case in this patch).
The final solution would be to change the separator to something less
line based to something more C based like RS=";{}". This is not a
blocker to this patchset as it actually fixes a broken script. But is an
interesting observation for whomever wants to continue this work.
Thx Thomas.
Best
--
Joel Granados