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.
[1] https://lore.kernel.org/all/sytyqb3ajm6ysoifwp57ga7gzlnzodhdsbgizbn3hqnlwytn5a@pbscftrq2qwl/
[2] https://sysctl-dev-rtd.readthedocs.io/en/latest/notes/ctltable_entry_macro.html#table-entry-macro
Wen Yang (2):
sysctl: introduce SYSCTL_ENTRY() helper macro
sysctl: convert kernel/sysctl-test.c to use SYSCTL_TBL_ENTRY()
include/linux/sysctl.h | 131 ++++++++++++++++++++++++++++++++++++++
kernel/sysctl-test.c | 139 ++++++++++++-----------------------------
2 files changed, 171 insertions(+), 99 deletions(-)
--
2.25.1