Skip to contentSkip to conversation

btrfs: ref-verify: use 'inline void' keyword ordering

PATCH In review Randy Dunlap 3 participants 3 messages Feb 19, 2021 – Feb 22, 2021 Btrfs file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 btrfs: ref-verify: use 'inline void' keyword ordering

Fix build warnings of function signature when CONFIG_STACKTRACE is not enabled by reordering the 'inline' and 'void' keywords.

../fs/btrfs/ref-verify.c:221:1: warning: ‘inline’ is not at beginning of declaration [-Wold-style-declaration]
static void inline __save_stack_trace(struct ref_action *ra)
../fs/btrfs/ref-verify.c:225:1: warning: ‘inline’ is not at beginning of declaration [-Wold-style-declaration]
static void inline __print_stack_trace(struct btrfs_fs_info *fs_info,

Fixes fd708b81d972 ("Btrfs: add a extent ref verify tool")
Cc Josef Bacik <[email protected]>
Cc David Sterba <[email protected]>
Cc Chris Mason <[email protected]>
Cc Andrew Morton <[email protected]>

---
Found in mmotm; applies to mainline.

Apparently we are doing more '-W' checking than when this change was made in 2017.

 fs/btrfs/ref-verify.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
fs/btrfs/ref-verify.c +2 -2
@@ -218,11 +218,11 @@ static void __print_stack_trace(struct b
 	stack_trace_print(ra->trace, ra->trace_len, 2);
 }
 #else
-static void inline __save_stack_trace(struct ref_action *ra)
+static inline void __save_stack_trace(struct ref_action *ra)
 {
 }
 
-static void inline __print_stack_trace(struct btrfs_fs_info *fs_info,
+static inline void __print_stack_trace(struct btrfs_fs_info *fs_info,
 				       struct ref_action *ra)
 {
 	btrfs_err(fs_info, "  ref-verify: no stacktrace support");
Acked-by on v1 1/1
#1 lore raw
Quoted 15 lines · Randy Dunlap

Fix build warnings of function signature when CONFIG_STACKTRACE is not enabled by reordering the 'inline' and 'void' keywords.

../fs/btrfs/ref-verify.c:221:1: warning: ‘inline’ is not at beginning of declaration [-Wold-style-declaration]
static void inline __save_stack_trace(struct ref_action *ra)
../fs/btrfs/ref-verify.c:225:1: warning: ‘inline’ is not at beginning of declaration [-Wold-style-declaration]
static void inline __print_stack_trace(struct btrfs_fs_info *fs_info,

Fixes fd708b81d972 ("Btrfs: add a extent ref verify tool")
Cc Josef Bacik <[email protected]>
Cc David Sterba <[email protected]>
Cc Chris Mason <[email protected]>
Cc Andrew Morton <[email protected]>
Quoted 2 lines

---
Found in mmotm; applies to mainline.

Thanks, fixes the warning in mainline for me.

Gr{oetje,eeting}s,

Geert

Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
#2 lore raw
In reply to Randy Dunlap
Quoted 8 lines · Randy Dunlap

Fix build warnings of function signature when CONFIG_STACKTRACE is not enabled by reordering the 'inline' and 'void' keywords.

../fs/btrfs/ref-verify.c:221:1: warning: ‘inline’ is not at beginning of declaration [-Wold-style-declaration]
static void inline __save_stack_trace(struct ref_action *ra)
../fs/btrfs/ref-verify.c:225:1: warning: ‘inline’ is not at beginning of declaration [-Wold-style-declaration]
static void inline __print_stack_trace(struct btrfs_fs_info *fs_info,

Quoted 7 lines
Fixes fd708b81d972 ("Btrfs: add a extent ref verify tool")
Cc Josef Bacik <[email protected]>
Cc David Sterba <[email protected]>
Cc Chris Mason <[email protected]>
Cc Andrew Morton <[email protected]>

Added to misc-next thanks.