From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (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 1BBCE4756AB for ; Fri, 7 Aug 2026 15:48:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786117703; cv=none; b=ITx+PGkSNkPzcig2xdvA8YuCVvfk2O/i/NG4woJXHfEizoN3QaKivnn9ly3POPRrrAhhJEIRIXGhGKrhRSI3zIrIlt90xR1NSxpjK+0S8I2jVxasjPFo5Rx5N3mBetUTAxQAvdo1ToMoAKLObvRE786G44UJZTyzqOQIxp7sc94= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786117703; c=relaxed/simple; bh=EC0HVDAY7xHn3bY2SRpj1qLoc8umNvnbqBhyEHDFYYQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=sM2Mo2ulIHnFV4YOxvyTp+xKxcUeYE6Id4KUpd9pcroz/XzUPXgz9VxQb4AUAgl0OHgqKxJln8fIWhVj93VDtp9H6PSiAjb/32EX/+PoD6z9PEEZXqWjd1anqjRECR9kSzJAJwja3KWMfKlKL7UbxFlmGAiaOinmSL/x7GIMhSY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=ZAGaRFIb; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="ZAGaRFIb" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1786117700; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=wRTBwi4e0KSmNUog/eCwXgqgwuW18KN2E5XZ+GhD+YE=; b=ZAGaRFIbtHyqkJxdCZp8SkQAemfAFFAegO1P8650hYoAPHCs+OFiUYRCoslYAX+b4EwKiW YZ99TuDbOQjNjqrvkREJOz7g559ThFhbTG+185Sux/6/oDoG+Fe/L61p6WfK33xmqCWdz2 DJJdt+S36wfiCBlvHbyIj+vTmgoqX4E= Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-160-ArW4YTiiOoq-VJ4hsy2uXA-1; Fri, 07 Aug 2026 11:48:17 -0400 X-MC-Unique: ArW4YTiiOoq-VJ4hsy2uXA-1 X-Mimecast-MFC-AGG-ID: ArW4YTiiOoq-VJ4hsy2uXA_1786117696 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id CE1FA195608F; Fri, 7 Aug 2026 15:48:15 +0000 (UTC) Received: from fedora (unknown [10.44.32.54]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with SMTP id 0C4D430001A2; Fri, 7 Aug 2026 15:48:12 +0000 (UTC) Received: by fedora (nbSMTP-1.00) for uid 1000 oleg@redhat.com; Fri, 7 Aug 2026 17:48:15 +0200 (CEST) Date: Fri, 7 Aug 2026 17:48:11 +0200 From: Oleg Nesterov To: Joel Granados Cc: Mark Brown , Luis Chamberlain , Sudip Mukherjee , Alexander Viro , Christian Brauner , Jan Kara , Kees Cook , linux-kernel@vger.kernel.org Subject: [PATCH sysctl-next 2/2] sysctl: remove redundant CONFIG_PROC_FS checks Message-ID: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 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 --- 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 -#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