From: Oleg Nesterov <oleg@redhat.com>
To: Joel Granados <joel.granados@kernel.org>
Cc: Mark Brown <broonie@kernel.org>,
Luis Chamberlain <mcgrof@kernel.org>,
Sudip Mukherjee <sudipm.mukherjee@gmail.com>,
Alexander Viro <viro@zeniv.linux.org.uk>,
Christian Brauner <brauner@kernel.org>, Jan Kara <jack@suse.cz>,
Kees Cook <kees@kernel.org>,
linux-kernel@vger.kernel.org
Subject: [PATCH sysctl-next 2/2] sysctl: remove redundant CONFIG_PROC_FS checks
Date: Fri, 7 Aug 2026 17:48:11 +0200 [thread overview]
Message-ID: <anX-O-yWjzHJ1KOe@redhat.com> (raw)
In-Reply-To: <anX-II_sAoJQy83X@redhat.com>
Now that CONFIG_PROC_SYSCTL is gone, CONFIG_SYSCTL depends on
CONFIG_PROC_FS directly in fs/proc/Kconfig, so the double guard
defined(CONFIG_SYSCTL) && defined(CONFIG_PROC_FS) is redundant.
Simplify to "#ifdef CONFIG_SYSCTL".
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
---
drivers/parport/procfs.c | 8 ++++----
fs/dcache.c | 2 +-
fs/file_table.c | 2 +-
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/parport/procfs.c b/drivers/parport/procfs.c
index 3880460e67f2..68a24e17a68f 100644
--- a/drivers/parport/procfs.c
+++ b/drivers/parport/procfs.c
@@ -26,9 +26,9 @@
#include <linux/uaccess.h>
-#if defined(CONFIG_SYSCTL) && defined(CONFIG_PROC_FS)
+#ifdef CONFIG_SYSCTL
-#define PARPORT_MIN_TIMESLICE_VALUE 1ul
+#define PARPORT_MIN_TIMESLICE_VALUE 1ul
#define PARPORT_MAX_TIMESLICE_VALUE ((unsigned long) HZ)
#define PARPORT_MIN_SPINTIME_VALUE 1
#define PARPORT_MAX_SPINTIME_VALUE 1000
@@ -560,7 +560,7 @@ static void __exit parport_default_proc_unregister(void)
parport_bus_exit();
}
-#else /* no sysctl or no procfs*/
+#else /* CONFIG_SYSCTL */
int parport_proc_register(struct parport *pp)
{
@@ -591,7 +591,7 @@ static void __exit parport_default_proc_unregister (void)
{
parport_bus_exit();
}
-#endif
+#endif /* CONFIG_SYSCTL */
subsys_initcall(parport_default_proc_register)
module_exit(parport_default_proc_unregister)
diff --git a/fs/dcache.c b/fs/dcache.c
index 3e9af9de7074..cb8a6b04a17a 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -144,7 +144,7 @@ static DEFINE_PER_CPU(long, nr_dentry_unused);
static DEFINE_PER_CPU(long, nr_dentry_negative);
static int dentry_negative_policy;
-#if defined(CONFIG_SYSCTL) && defined(CONFIG_PROC_FS)
+#ifdef CONFIG_SYSCTL
/* Statistics gathering. */
static struct dentry_stat_t dentry_stat = {
.age_limit = 45,
diff --git a/fs/file_table.c b/fs/file_table.c
index c68b8c0a4097..08ca3631b726 100644
--- a/fs/file_table.c
+++ b/fs/file_table.c
@@ -122,7 +122,7 @@ unsigned long get_max_files(void)
}
EXPORT_SYMBOL_GPL(get_max_files);
-#if defined(CONFIG_SYSCTL) && defined(CONFIG_PROC_FS)
+#ifdef CONFIG_SYSCTL
/*
* Handle nr_files sysctl
--
2.52.0
next prev parent reply other threads:[~2026-08-07 15:48 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-07 15:47 [PATCH sysctl-next 1/2] sysctl: collapse redundant CONFIG_SYSCTL nesting in kernel/sysctl.c Oleg Nesterov
2026-08-07 15:48 ` Oleg Nesterov [this message]
2026-08-07 18:01 ` [PATCH sysctl-next 2/2] sysctl: remove redundant CONFIG_PROC_FS checks Bradley Morgan
2026-08-10 10:58 ` Joel Granados
2026-08-10 12:07 ` Oleg Nesterov
2026-08-11 12:53 ` Joel Granados
2026-08-07 17:16 ` [PATCH sysctl-next 1/2] sysctl: collapse redundant CONFIG_SYSCTL nesting in kernel/sysctl.c Bradley Morgan
2026-08-10 11:08 ` Joel Granados
2026-08-10 12:24 ` Oleg Nesterov
2026-08-11 12:52 ` 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=anX-O-yWjzHJ1KOe@redhat.com \
--to=oleg@redhat.com \
--cc=brauner@kernel.org \
--cc=broonie@kernel.org \
--cc=jack@suse.cz \
--cc=joel.granados@kernel.org \
--cc=kees@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mcgrof@kernel.org \
--cc=sudipm.mukherjee@gmail.com \
--cc=viro@zeniv.linux.org.uk \
/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.