From: "Thomas Weißschuh" <linux@weissschuh.net>
To: Luis Chamberlain <mcgrof@kernel.org>, Kees Cook <kees@kernel.org>,
Joel Granados <j.granados@samsung.com>
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
"Thomas Weißschuh" <linux@weissschuh.net>
Subject: [PATCH] sysctl: update comments to new registration APIs
Date: Sat, 10 Aug 2024 19:00:35 +0200 [thread overview]
Message-ID: <20240810-sysctl-procname-null-comment-v1-1-816cd335de1b@weissschuh.net> (raw)
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>
---
include/linux/sysctl.h | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
index aa4c6d44aaa0..47ca2536865b 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;
---
base-commit: 34ac1e82e5a78d5ed7f647766f5b1b51ca4d983a
change-id: 20240810-sysctl-procname-null-comment-80160bd4089f
Best regards,
--
Thomas Weißschuh <linux@weissschuh.net>
next reply other threads:[~2024-08-10 17:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-10 17:00 Thomas Weißschuh [this message]
2024-08-12 18:11 ` [PATCH] sysctl: update comments to new registration APIs Kees Cook
2024-10-23 13:32 ` Joel Granados
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240810-sysctl-procname-null-comment-v1-1-816cd335de1b@weissschuh.net \
--to=linux@weissschuh.net \
--cc=j.granados@samsung.com \
--cc=kees@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mcgrof@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.