2023-12-20 21:24:02

by Thomas Weißschuh

[permalink] [raw]
Subject: [PATCH] sysctl: remove struct ctl_path

All usages of this struct have been removed from the kernel tree.

The struct is still referenced by scripts/check-sysctl-docs but that
script is broken anyways as it only supports the register_sysctl_paths()
API and not the currently used register_sysctl() one.

Fixes: 0199849acd07 ("sysctl: remove register_sysctl_paths()")
Signed-off-by: Thomas Weißschuh <[email protected]>
---
include/linux/sysctl.h | 5 -----
1 file changed, 5 deletions(-)

diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
index 61b40ea81f4d..8084e9132833 100644
--- a/include/linux/sysctl.h
+++ b/include/linux/sysctl.h
@@ -210,11 +210,6 @@ struct ctl_table_root {
int (*permissions)(struct ctl_table_header *head, struct ctl_table *table);
};

-/* struct ctl_path describes where in the hierarchy a table is added */
-struct ctl_path {
- const char *procname;
-};
-
#define register_sysctl(path, table) \
register_sysctl_sz(path, table, ARRAY_SIZE(table))


---
base-commit: 1a44b0073b9235521280e19d963b6dfef7888f18
change-id: 20231220-sysctl-paths-474697856a3f

Best regards,
--
Thomas Weißschuh <[email protected]>



2023-12-24 18:45:14

by Joel Granados

[permalink] [raw]
Subject: Re: [PATCH] sysctl: remove struct ctl_path

On Wed, Dec 20, 2023 at 10:23:35PM +0100, Thomas Wei?schuh wrote:
> All usages of this struct have been removed from the kernel tree.
>
> The struct is still referenced by scripts/check-sysctl-docs but that
> script is broken anyways as it only supports the register_sysctl_paths()
> API and not the currently used register_sysctl() one.
>
> Fixes: 0199849acd07 ("sysctl: remove register_sysctl_paths()")
> Signed-off-by: Thomas Wei?schuh <[email protected]>
> ---
> include/linux/sysctl.h | 5 -----
> 1 file changed, 5 deletions(-)
>
> diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
> index 61b40ea81f4d..8084e9132833 100644
> --- a/include/linux/sysctl.h
> +++ b/include/linux/sysctl.h
> @@ -210,11 +210,6 @@ struct ctl_table_root {
> int (*permissions)(struct ctl_table_header *head, struct ctl_table *table);
> };
>
> -/* struct ctl_path describes where in the hierarchy a table is added */
> -struct ctl_path {
> - const char *procname;
> -};
> -
> #define register_sysctl(path, table) \
> register_sysctl_sz(path, table, ARRAY_SIZE(table))
>
>
> ---
> base-commit: 1a44b0073b9235521280e19d963b6dfef7888f18
> change-id: 20231220-sysctl-paths-474697856a3f
>
> Best regards,
> --
> Thomas Wei?schuh <[email protected]>
>

LGTM
Reviewed-by: Joel Granados <[email protected]>

--

Joel Granados


Attachments:
(No filename) (1.35 kB)
signature.asc (673.00 B)
Download all attachments

2023-12-28 13:12:02

by Luis Chamberlain

[permalink] [raw]
Subject: Re: [PATCH] sysctl: remove struct ctl_path

On Wed, Dec 20, 2023 at 10:23:35PM +0100, Thomas Wei?schuh wrote:
> All usages of this struct have been removed from the kernel tree.
>
> The struct is still referenced by scripts/check-sysctl-docs but that
> script is broken anyways as it only supports the register_sysctl_paths()
> API and not the currently used register_sysctl() one.
>
> Fixes: 0199849acd07 ("sysctl: remove register_sysctl_paths()")
> Signed-off-by: Thomas Wei?schuh <[email protected]>

Patch applied and pushed, thanks!

Luis