Skip to content

RFC sysctl: refactor ctl_table creation and change extra{1,2} type

[email protected] lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 RFC Latest2 patches 2 repliesIn review
  2. v1 RFC4 patches 3 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2sysctl: introduce SYSCTL_ENTRY() helper macroinclude/linux/sysctl.h+131 -01 reply
2/2sysctl: convert kernel/sysctl-test.c to use SYSCTL_TBL_ENTRY()kernel/sysctl-test.c+40 -990 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [RFC PATCH v2 0/2] sysctl: refactor ctl_table creation and change extra{1,2} type

From: Wen Yang <[email protected]>

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(-)
Signature · 1 line
2.25.1