public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/4] sysctl: refactor ctl_table creation and change extra{1,2} type
@ 2026-01-13 17:40 wen.yang
  2026-01-13 17:40 ` [RFC PATCH 1/4] sysctl: add SYSCTL_ENTRY/SYSCTL_RANGE_ENTRY helpers for ctl_table init wen.yang
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: wen.yang @ 2026-01-13 17:40 UTC (permalink / raw)
  To: Joel Granados; +Cc: linux-kernel, Wen Yang

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


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-01-25 20:08 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-13 17:40 [RFC PATCH 0/4] sysctl: refactor ctl_table creation and change extra{1,2} type wen.yang
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox