mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-16 13:34:30 +00:00
isdn: kcapi: don't build unused procfs code
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 <arnd@arndb.de> Link: https://lore.kernel.org/r/20240403080702.3509288-27-arnd@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
17b35355c2
commit
91188544af
@ -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
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user