summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Weißschuh <linux@weissschuh.net>2024-08-10 19:00:35 +0200
committerJoel Granados <joel.granados@kernel.org>2024-10-23 15:28:28 +0200
commit50a191a8a12b33dfad3b27c6ba4e76c5ba39db73 (patch)
tree75ea51268c41295cc2eb1bf9d0ce0b8ae5e4404c
parent7701ab7846922e81e65315051d599d6d9b6d41c0 (diff)
sysctl: update comments to new registration APIs
The sysctl registration APIs do not need a terminating table entry anymore and with commit acc154691fc7 ("sysctl: Warn on an empty procname element") even emit warnings if such a sentinel entry is supplied. While at it also remove the mention of "table->de" which was removed in commit 3fbfa98112fc ("[PATCH] sysctl: remove the proc_dir_entry member for the sysctl tables") back in 2007. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Reviewed-by: Kees Cook <kees@kernel.org> Signed-off-by: Joel Granados <joel.granados@kernel.org>
-rw-r--r--include/linux/sysctl.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
index 202855befa8b..40a6ac6c9713 100644
--- a/include/linux/sysctl.h
+++ b/include/linux/sysctl.h
@@ -90,9 +90,7 @@ int proc_do_static_key(const struct ctl_table *table, int write, void *buffer,
/*
* Register a set of sysctl names by calling register_sysctl
- * with an initialised array of struct ctl_table's. An entry with
- * NULL procname terminates the table. table->de will be
- * set up by the registration and need not be initialised in advance.
+ * with an initialised array of struct ctl_table's.
*
* sysctl names can be mirrored automatically under /proc/sys. The
* procname supplied controls /proc naming.
@@ -133,7 +131,7 @@ static inline void *proc_sys_poll_event(struct ctl_table_poll *poll)
/* A sysctl table is an array of struct ctl_table: */
struct ctl_table {
- const char *procname; /* Text ID for /proc/sys, or zero */
+ const char *procname; /* Text ID for /proc/sys */
void *data;
int maxlen;
umode_t mode;