diff options
author | Josef Bacik <josef@toxicpanda.com> | 2022-10-19 10:50:50 -0400 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2022-12-05 18:00:41 +0100 |
commit | bbde07a40a13cc5a3483eaeb52e9bb3b61d2cf57 (patch) | |
tree | 1ba4f3a6ab5723edff3720274f891a454da8de04 /fs/btrfs/messages.h | |
parent | 9b569ea0be6fb27a4985acc9325896a3edc95ede (diff) |
btrfs: push printk index code into their respective helpers
The printk index work can be pushed into the printk helpers themselves,
this allows us to further sanitize messages.h, removing the last
include in the header itself.
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/messages.h')
-rw-r--r-- | fs/btrfs/messages.h | 29 |
1 files changed, 1 insertions, 28 deletions
diff --git a/fs/btrfs/messages.h b/fs/btrfs/messages.h index ace5bb02820a..3772358f8d30 100644 --- a/fs/btrfs/messages.h +++ b/fs/btrfs/messages.h @@ -13,19 +13,7 @@ void btrfs_no_printk(const struct btrfs_fs_info *fs_info, const char *fmt, ...) { } -#ifdef CONFIG_PRINTK_INDEX - -#define btrfs_printk(fs_info, fmt, args...) \ -do { \ - printk_index_subsys_emit("%sBTRFS %s (device %s): ", NULL, fmt); \ - _btrfs_printk(fs_info, fmt, ##args); \ -} while (0) - -__printf(2, 3) -__cold -void _btrfs_printk(const struct btrfs_fs_info *fs_info, const char *fmt, ...); - -#elif defined(CONFIG_PRINTK) +#ifdef CONFIG_PRINTK #define btrfs_printk(fs_info, fmt, args...) \ _btrfs_printk(fs_info, fmt, ##args) @@ -223,25 +211,10 @@ do { \ __LINE__, (errno), first); \ } while (0) -#ifdef CONFIG_PRINTK_INDEX - -#define btrfs_handle_fs_error(fs_info, errno, fmt, args...) \ -do { \ - printk_index_subsys_emit( \ - "BTRFS: error (device %s%s) in %s:%d: errno=%d %s", \ - KERN_CRIT, fmt); \ - __btrfs_handle_fs_error((fs_info), __func__, __LINE__, \ - (errno), fmt, ##args); \ -} while (0) - -#else - #define btrfs_handle_fs_error(fs_info, errno, fmt, args...) \ __btrfs_handle_fs_error((fs_info), __func__, __LINE__, \ (errno), fmt, ##args) -#endif - __printf(5, 6) __cold void __btrfs_panic(struct btrfs_fs_info *fs_info, const char *function, |