From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-189.mta0.migadu.com (out-189.mta0.migadu.com [91.218.175.189]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A738E2E5B09 for ; Sat, 7 Feb 2026 20:35:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.189 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770496532; cv=none; b=gqpfAzo/bFVINeK6ToLLBXG2hh5AENUfNv0QH6aNDqSiBVXep2V66Ia882nxzgcskHzEERu+jlVLHA08KmpyFEHKYcGHHef99HYXJHxICkSydY42sHVoieAdz5NrYjchUkRDP1zFyQ0NJ9W5Ii3CEGW4RT4pdAUv3pdq99394jE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770496532; c=relaxed/simple; bh=w52YbFMVksNPrPM1Gk0rZts2nxZPISI8fBqNwvwhSQU=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=D5TxekWdQ6D+eZj7RRT8BluUVKana+WeigxVTvKMx6gapCfPjVXjGIEZ455cyZkEIHIRlR3dwB2l4L0EvcP1HmgcSjj7ewB+ZgfQnQ1lyO1UBAvw/c93RIeeeqe+RAosYxHILkCh9btEJ7IxNML8cspMsJy+AWJTfcitSYi5Gu8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=D4Jjxd8k; arc=none smtp.client-ip=91.218.175.189 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="D4Jjxd8k" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1770496529; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=KqaYCNapSByvUrSYhJpOMm4g+CX91wKGEfGybS/l0RA=; b=D4Jjxd8kIdWufkDH52ZKc3UhrAe5HyIg7N2bnlqxDTMOpR3w7dDkBdtWS1NUcuDDNAmX07 U6UUBZX4V4tofe/TNdA2RXm463KjbOl0UVR+LxiHzchQDD1RbUgGK3bzyWKxE/chnkz11m Xz1yiZweVMUoZBV6lsJeyROgF1jS9OM= From: wen.yang@linux.dev To: Joel Granados Cc: linux-kernel@vger.kernel.org, Wen Yang 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 Message-Id: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT From: Wen Yang 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