All of lore.kernel.org
 help / color / mirror / Atom feed
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 v2 0/2]  sysctl: refactor ctl_table creation and change extra{1,2} type
Date: Sun,  8 Feb 2026 04:35:15 +0800	[thread overview]
Message-ID: <cover.1770496163.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.


[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


             reply	other threads:[~2026-02-07 20:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-07 20:35 wen.yang [this message]
2026-02-07 20:35 ` [RFC PATCH v2 1/2] sysctl: introduce SYSCTL_ENTRY() helper macro wen.yang
2026-02-19 10:33   ` Joel Granados
2026-02-07 20:35 ` [RFC PATCH v2 2/2] sysctl: convert kernel/sysctl-test.c to use SYSCTL_TBL_ENTRY() wen.yang
2026-02-19  8:59 ` [RFC PATCH v2 0/2] sysctl: refactor ctl_table creation and change extra{1,2} type 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=cover.1770496163.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.