lkml.org 
[lkml]   [2024]   [Apr]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] bcachefs: Use format specifier %u instead of %lu
Date
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

\
 
 \ /
  Last update: 2024-05-27 17:55    [W:0.161 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site