From: wen.yang@linux.dev
To: Joel Granados <joel.granados@kernel.org>
Cc: linux-kernel@vger.kernel.org, Wen Yang <wen.yang@linux.dev>
Subject: [RFC PATCH 0/4] sysctl: refactor ctl_table creation and change extra{1,2} type
Date: Wed, 14 Jan 2026 01:40:29 +0800 [thread overview]
Message-ID: <cover.1768324215.git.wen.yang@linux.dev> (raw)
From: Wen Yang <wen.yang@linux.dev>
This series introduces macros to centralize ctl_table initialization,
preparing for future type changes to extra1/extra2 fields.
Following Joel's suggestion [1], we start with helpers that work for all
existing patterns before making invasive changes. This lays groundwork
for eventually changing extra1/extra2 from void* to unsigned long.
[1] https://lore.kernel.org/all/sytyqb3ajm6ysoifwp57ga7gzlnzodhdsbgizbn3hqnlwytn5a@pbscftrq2qwl/
Wen Yang (4):
sysctl: add SYSCTL_ENTRY/SYSCTL_RANGE_ENTRY helpers for ctl_table init
sysctl: add helper functions to extract table->extra1/extra2
sysctl: support encoding values directly in the table entry
scripts/coccinelle: add sysctl_table_init.cocci
include/linux/sysctl.h | 78 ++-
kernel/sysctl-test.c | 273 +++++----
kernel/sysctl.c | 57 +-
.../coccinelle/api/sysctl_table_init.cocci | 519 ++++++++++++++++++
4 files changed, 779 insertions(+), 148 deletions(-)
create mode 100644 scripts/coccinelle/api/sysctl_table_init.cocci
--
2.25.1
next reply other threads:[~2026-01-13 17:40 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-13 17:40 wen.yang [this message]
2026-01-13 17:40 ` [RFC PATCH 1/4] sysctl: add SYSCTL_ENTRY/SYSCTL_RANGE_ENTRY helpers for ctl_table init wen.yang
2026-01-21 14:30 ` Joel Granados
2026-01-22 9:56 ` Joel Granados
2026-01-25 20:08 ` Wen Yang
2026-01-13 17:40 ` [RFC PATCH 2/4] sysctl: add helper functions to extract table->extra1/extra2 wen.yang
2026-01-13 17:40 ` [RFC PATCH 3/4] sysctl: support encoding values directly in the table entry wen.yang
2026-01-13 17:40 ` [RFC PATCH 4/4] scripts/coccinelle: add sysctl_table_init.cocci wen.yang
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=cover.1768324215.git.wen.yang@linux.dev \
--to=wen.yang@linux.dev \
--cc=joel.granados@kernel.org \
--cc=linux-kernel@vger.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.