aboutsummaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/btree_trans_commit.c
diff options
context:
space:
mode:
authorNathan Chancellor <[email protected]>2023-09-12 19:15:39 +0000
committerKent Overstreet <[email protected]>2023-10-22 21:10:13 +0000
commitf7ed15eb177ffd55e97c5817e2ccaacc364be4cd (patch)
tree6f1ed13be31920b53a96ff64f416401908194151 /fs/bcachefs/btree_trans_commit.c
parentbcachefs: Fix -Wformat in bch2_set_bucket_needs_journal_commit() (diff)
downloadkernel-f7ed15eb177ffd55e97c5817e2ccaacc364be4cd.tar.gz
kernel-f7ed15eb177ffd55e97c5817e2ccaacc364be4cd.zip
bcachefs: Fix -Wformat in bch2_btree_key_cache_to_text()
When building bcachefs for 32-bit ARM, there is a compiler warning in bch2_btree_key_cache_to_text() due to use of an incorrect format specifier: fs/bcachefs/btree_key_cache.c:1060:36: error: format specifies type 'size_t' (aka 'unsigned int') but the argument has type 'long' [-Werror,-Wformat] 1060 | prt_printf(out, "nr_freed:\t%zu", atomic_long_read(&c->nr_freed)); | ~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | %ld fs/bcachefs/util.h:223:54: note: expanded from macro 'prt_printf' 223 | #define prt_printf(_out, ...) bch2_prt_printf(_out, __VA_ARGS__) | ^~~~~~~~~~~ 1 error generated. On 64-bit architectures, size_t is 'unsigned long', so there is no warning when using %zu but on 32-bit architectures, size_t is 'unsigned int'. Use '%lu' to match the other format specifiers used in this function for printing values returned from atomic_long_read(). Fixes: 6d799930ce0f ("bcachefs: btree key cache pcpu freedlist") Signed-off-by: Nathan Chancellor <[email protected]> Signed-off-by: Kent Overstreet <[email protected]>
Diffstat (limited to 'fs/bcachefs/btree_trans_commit.c')
0 files changed, 0 insertions, 0 deletions