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

drivers/s390/char/zcore.c:49:23: error: variable
 'zcore_reipl_file' set but not used [-Werror,-Wunused-but-set-global]
drivers/s390/char/zcore.c:50:23: error: variable
 'zcore_hsa_file' set but not used [-Werror,-Wunused-but-set-global]

Remove both of them, since there is no point in keeping them.

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>
drivers/s390/char/zcore.c

index b26b5fca6ce83f4ae2c424ddb41899a0625d0e40..a131f171208c363d9da74a8ef197a671812bf6c2 100644 (file)
@@ -46,8 +46,6 @@ struct ipib_info {
 static struct debug_info *zcore_dbf;
 static int hsa_available;
 static struct dentry *zcore_dir;
-static struct dentry *zcore_reipl_file;
-static struct dentry *zcore_hsa_file;
 static struct ipl_parameter_block *zcore_ipl_block;
 static unsigned long os_info_flags;
 
@@ -353,10 +351,8 @@ static int __init zcore_init(void)
                goto fail;
 
        zcore_dir = debugfs_create_dir("zcore" , NULL);
-       zcore_reipl_file = debugfs_create_file("reipl", S_IRUSR, zcore_dir,
-                                               NULL, &zcore_reipl_fops);
-       zcore_hsa_file = debugfs_create_file("hsa", S_IRUSR|S_IWUSR, zcore_dir,
-                                            NULL, &zcore_hsa_fops);
+       debugfs_create_file("reipl", S_IRUSR, zcore_dir, NULL, &zcore_reipl_fops);
+       debugfs_create_file("hsa", S_IRUSR|S_IWUSR, zcore_dir, NULL, &zcore_hsa_fops);
 
        register_reboot_notifier(&zcore_reboot_notifier);
        atomic_notifier_chain_register(&panic_notifier_list, &zcore_on_panic_notifier);