]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
s390/debug: Remove s390dbf_sysctl_header variable
authorHeiko Carstens <hca@linux.ibm.com>
Tue, 19 May 2026 06:20:40 +0000 (08:20 +0200)
committerAlexander Gordeev <agordeev@linux.ibm.com>
Tue, 26 May 2026 06:15:39 +0000 (08:15 +0200)
allmodconfig with clang W=1 points out an unused global variable:

arch/s390/kernel/debug.c:1237:33: error: variable
 's390dbf_sysctl_header' set but not used [-Werror,-Wunused-but-set-global]

Just remove the variable. There is no point in adding error handling for a
failing register_sysctl() call.

Reviewed-by: Christian Borntraeger <borntraeger@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
arch/s390/kernel/debug.c

index 7bc403d081fac6c40b876fd711e3c2d12b1c5b17..dbf430f479bdfea59aef4944ebfbd6e8a271b05c 100644 (file)
@@ -1234,8 +1234,6 @@ static const struct ctl_table s390dbf_table[] = {
        },
 };
 
-static struct ctl_table_header *s390dbf_sysctl_header;
-
 /**
  * debug_stop_all() - stops the debug feature if stopping is allowed.
  *
@@ -1825,7 +1823,7 @@ EXPORT_SYMBOL(debug_sprintf_format_fn);
  */
 static int __init debug_init(void)
 {
-       s390dbf_sysctl_header = register_sysctl("s390dbf", s390dbf_table);
+       register_sysctl("s390dbf", s390dbf_table);
        mutex_lock(&debug_mutex);
        debug_debugfs_root_entry = debugfs_create_dir(DEBUG_DIR_ROOT, NULL);
        initialized = 1;