[PATCH] bcachefs: Use format specifier %u instead of %lu

Thorsten Blum posted 1 patch 1 year, 9 months ago
fs/bcachefs/btree_io.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
[PATCH] bcachefs: Use format specifier %u instead of %lu
Posted by Thorsten Blum 1 year, 9 months ago
Use %u instead of %lu and cast the value to unsigned int to resolve the
following warning on m68k:

	format ‘%lu’ expects argument of type ‘long unsigned int’, but
	argument 12 has type ‘unsigned int’

Signed-off-by: Thorsten Blum <thorsten.blum@toblux.com>
---
 fs/bcachefs/btree_io.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/fs/bcachefs/btree_io.c b/fs/bcachefs/btree_io.c
index 9678b2375bed..45dff1a77366 100644
--- a/fs/bcachefs/btree_io.c
+++ b/fs/bcachefs/btree_io.c
@@ -888,9 +888,10 @@ static int validate_bset_keys(struct bch_fs *c, struct btree *b,
 				 -BCH_ERR_btree_node_read_err_fixable,
 				 c, NULL, b, i,
 				 btree_node_bkey_bad_u64s,
-				 "bad k->u64s %u (min %u max %lu)", k->u64s,
+				 "bad k->u64s %u (min %u max %u)", k->u64s,
 				 bkeyp_key_u64s(&b->format, k),
-				 U8_MAX - BKEY_U64s + bkeyp_key_u64s(&b->format, k)))
+				 (unsigned int)(U8_MAX - BKEY_U64s +
+					bkeyp_key_u64s(&b->format, k))))
 			goto drop_this_key;
 
 		if (!write)
-- 
2.44.0