From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 C53FE6BFC2; Wed, 3 Apr 2024 08:11:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712131893; cv=none; b=TIRx1sJQazHniDOMl2lxRw5oTJFmMyk587p0yrTV66M3Y6+00HWY4XTiDMJHrzbn8IedR7ouXL7ESS4zNY7qad7jstP2+sQNr1qbStOeyNhUCeA8enpfsbdvvG5BUhwec6cIZyZ7CHqr94Y3HzdT3j8ZyDs+Cg6R2XxV4TC6i0o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712131893; c=relaxed/simple; bh=SH31gyLQOUjbQcsB8HrfJNW22dR7OQWuGrhgZCjvHU8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=PXLgbXcXWJo5jR87y6N+M2qaHg5837eymDKdFOTlbfxnuU9ta3S8G/JYl26xecN2iYLoL56NdYFASS9hQfB0WiCwL+PQRnxA7CQkKvWK44lI9Zp3asY4F/7hdQv+k3c14Mh5fvzXuEGtXv+s8M15uzTB8h2d+5Pt9K3ImTsvBy4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=FidQLK6g; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="FidQLK6g" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DD697C433F1; Wed, 3 Apr 2024 08:11:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712131893; bh=SH31gyLQOUjbQcsB8HrfJNW22dR7OQWuGrhgZCjvHU8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FidQLK6gJYLaHmLSbMmJq7Apfm2CmmsGY0w8vFJ9AUgB5Uvdf+QMvV5PQKVWqQAsm UDMd2GxCQgrKO2Y4/qnJXh1w61ipZJlUbr0wgYopmxLFUXvny2uvMjnn/JGYWwXtIj M07HB74PU7sW9slUtYd/dghQLUoDL0ycxWajmLD3jCfbjHh8rUfLLB6pQbseX/wRgC cfIg9+Xx3szTAegVMFufdxt8Cj6BvbFapg8ir/FoHKNqqZmtd2bIDnZoh2EGuj+K0q OLpDs6Gn5QRKlNWmZt/Zg9ZIlPjf4h0g0l0adlbszBXPhIovybmrJFgeeYLiy/60LI B1j3vM0Uy+ung== From: Arnd Bergmann To: linux-kernel@vger.kernel.org Cc: Arnd Bergmann , Karsten Keil , Kees Cook , Justin Stitt , netdev@vger.kernel.org Subject: [PATCH 26/34] isdn: kcapi: don't build unused procfs code Date: Wed, 3 Apr 2024 10:06:44 +0200 Message-Id: <20240403080702.3509288-27-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240403080702.3509288-1-arnd@kernel.org> References: <20240403080702.3509288-1-arnd@kernel.org> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Arnd Bergmann The procfs file is completely unused without CONFIG_PROC_FS but causes a compile time warning: drivers/isdn/capi/kcapi_proc.c:97:36: error: unused variable 'seq_controller_ops' [-Werror,-Wunused-const-variable] static const struct seq_operations seq_controller_ops = { drivers/isdn/capi/kcapi_proc.c:104:36: error: unused variable 'seq_contrstats_ops' [-Werror,-Wunused-const-variable] drivers/isdn/capi/kcapi_proc.c:179:36: error: unused variable 'seq_applications_ops' [-Werror,-Wunused-const-variable] drivers/isdn/capi/kcapi_proc.c:186:36: error: unused variable 'seq_applstats_ops' [-Werror,-Wunused-const-variable] Remove the file from the build in that config and make the calls into it conditional instead. Signed-off-by: Arnd Bergmann --- drivers/isdn/capi/Makefile | 3 ++- drivers/isdn/capi/kcapi.c | 7 +++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/isdn/capi/Makefile b/drivers/isdn/capi/Makefile index 352217ebabd8..4fd3a4d7133f 100644 --- a/drivers/isdn/capi/Makefile +++ b/drivers/isdn/capi/Makefile @@ -2,4 +2,5 @@ # Makefile for the CAPI subsystem used by BT_CMTP obj-$(CONFIG_BT_CMTP) += kernelcapi.o -kernelcapi-y := kcapi.o capiutil.o capi.o kcapi_proc.o +kernelcapi-y := kcapi.o capiutil.o capi.o +kernelcapi-$(CONFIG_PROC_FS) += kcapi_proc.o diff --git a/drivers/isdn/capi/kcapi.c b/drivers/isdn/capi/kcapi.c index 136ba9fe55e0..c5d13bdc239b 100644 --- a/drivers/isdn/capi/kcapi.c +++ b/drivers/isdn/capi/kcapi.c @@ -917,13 +917,16 @@ int __init kcapi_init(void) return err; } - kcapi_proc_init(); + if (IS_ENABLED(CONFIG_PROC_FS)) + kcapi_proc_init(); + return 0; } void kcapi_exit(void) { - kcapi_proc_exit(); + if (IS_ENABLED(CONFIG_PROC_FS)) + kcapi_proc_exit(); cdebug_exit(); destroy_workqueue(kcapi_wq); -- 2.39.2