Commit edf57cbf authored by Bart Van Assche's avatar Bart Van Assche Committed by David Sterba

btrfs: Fix a C compliance issue

The C programming language does not allow to use preprocessor statements
inside macro arguments (pr_info() is defined as a macro). Hence rework
the pr_info() statement in btrfs_print_mod_info() such that it becomes
compliant. This patch allows tools like sparse to analyze the BTRFS
source code.

Fixes: 62e85577 ("btrfs: convert printk(KERN_* to use pr_* calls")
Signed-off-by: default avatarBart Van Assche <bart.vanassche@wdc.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent acd43e3c
...@@ -2370,7 +2370,7 @@ static __cold void btrfs_interface_exit(void) ...@@ -2370,7 +2370,7 @@ static __cold void btrfs_interface_exit(void)
static void __init btrfs_print_mod_info(void) static void __init btrfs_print_mod_info(void)
{ {
pr_info("Btrfs loaded, crc32c=%s" static const char options[] = ""
#ifdef CONFIG_BTRFS_DEBUG #ifdef CONFIG_BTRFS_DEBUG
", debug=on" ", debug=on"
#endif #endif
...@@ -2383,8 +2383,8 @@ static void __init btrfs_print_mod_info(void) ...@@ -2383,8 +2383,8 @@ static void __init btrfs_print_mod_info(void)
#ifdef CONFIG_BTRFS_FS_REF_VERIFY #ifdef CONFIG_BTRFS_FS_REF_VERIFY
", ref-verify=on" ", ref-verify=on"
#endif #endif
"\n", ;
crc32c_impl()); pr_info("Btrfs loaded, crc32c=%s%s\n", crc32c_impl(), options);
} }
static int __init init_btrfs_fs(void) static int __init init_btrfs_fs(void)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment