* [PATCH resend 1/2] bcache: Use %zi to format size_t
@ 2014-02-03 13:49 Geert Uytterhoeven
2014-02-03 13:49 ` [PATCH v2 2/2] bcache: Drop L-suffix when comparing ssize_t with 0 Geert Uytterhoeven
2014-02-03 17:34 ` [PATCH resend 1/2] bcache: Use %zi to format size_t Ian Pilcher
0 siblings, 2 replies; 4+ messages in thread
From: Geert Uytterhoeven @ 2014-02-03 13:49 UTC (permalink / raw)
To: Kent Overstreet, Neil Brown, Andrew Morton
Cc: linux-bcache, linux-raid, linux-kernel, Geert Uytterhoeven
drivers/md/bcache/extents.c: In function ‘btree_ptr_bad_expensive’:
drivers/md/bcache/extents.c:196: warning: format ‘%li’ expects type ‘long int’, but argument 4 has type ‘size_t’
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
Issue has migrated from linux-next to Linus' tree
drivers/md/bcache/extents.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/md/bcache/extents.c b/drivers/md/bcache/extents.c
index c3ead586dc27..416d1a3e028e 100644
--- a/drivers/md/bcache/extents.c
+++ b/drivers/md/bcache/extents.c
@@ -194,7 +194,7 @@ err:
mutex_unlock(&b->c->bucket_lock);
bch_extent_to_text(buf, sizeof(buf), k);
btree_bug(b,
-"inconsistent btree pointer %s: bucket %li pin %i prio %i gen %i last_gc %i mark %llu gc_gen %i",
+"inconsistent btree pointer %s: bucket %zi pin %i prio %i gen %i last_gc %i mark %llu gc_gen %i",
buf, PTR_BUCKET_NR(b->c, k, i), atomic_read(&g->pin),
g->prio, g->gen, g->last_gc, GC_MARK(g), g->gc_gen);
return true;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH v2 2/2] bcache: Drop L-suffix when comparing ssize_t with 0
2014-02-03 13:49 [PATCH resend 1/2] bcache: Use %zi to format size_t Geert Uytterhoeven
@ 2014-02-03 13:49 ` Geert Uytterhoeven
2014-02-03 17:34 ` [PATCH resend 1/2] bcache: Use %zi to format size_t Ian Pilcher
1 sibling, 0 replies; 4+ messages in thread
From: Geert Uytterhoeven @ 2014-02-03 13:49 UTC (permalink / raw)
To: Kent Overstreet, Neil Brown, Andrew Morton
Cc: linux-bcache, linux-raid, linux-kernel, Geert Uytterhoeven
drivers/md/bcache/btree.c: In function ‘insert_u64s_remaining’:
drivers/md/bcache/btree.c:1816: warning: comparison of distinct pointer types lacks a cast
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
Issue has migrated from linux-next to Linus' tree
v2: Drop L-suffix instead of using max_t(ssize_t, ...), as suggested by Joe
Perches
drivers/md/bcache/btree.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/md/bcache/btree.c b/drivers/md/bcache/btree.c
index 98cc0a810a36..f08e48f12291 100644
--- a/drivers/md/bcache/btree.c
+++ b/drivers/md/bcache/btree.c
@@ -1813,7 +1813,7 @@ static size_t insert_u64s_remaining(struct btree *b)
if (b->keys.ops->is_extents)
ret -= KEY_MAX_U64S;
- return max(ret, 0L);
+ return max(ret, 0);
}
static bool bch_btree_insert_keys(struct btree *b, struct btree_op *op,
--
1.7.9.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH resend 1/2] bcache: Use %zi to format size_t
2014-02-03 13:49 [PATCH resend 1/2] bcache: Use %zi to format size_t Geert Uytterhoeven
2014-02-03 13:49 ` [PATCH v2 2/2] bcache: Drop L-suffix when comparing ssize_t with 0 Geert Uytterhoeven
@ 2014-02-03 17:34 ` Ian Pilcher
2014-02-03 18:49 ` Geert Uytterhoeven
1 sibling, 1 reply; 4+ messages in thread
From: Ian Pilcher @ 2014-02-03 17:34 UTC (permalink / raw)
To: linux-kernel; +Cc: linux-bcache, linux-raid
Shouldn't size_t use %zu?
--
========================================================================
Ian Pilcher arequipeno@gmail.com
Sent from the cloud -- where it's already tomorrow
========================================================================
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH resend 1/2] bcache: Use %zi to format size_t
2014-02-03 17:34 ` [PATCH resend 1/2] bcache: Use %zi to format size_t Ian Pilcher
@ 2014-02-03 18:49 ` Geert Uytterhoeven
0 siblings, 0 replies; 4+ messages in thread
From: Geert Uytterhoeven @ 2014-02-03 18:49 UTC (permalink / raw)
To: Ian Pilcher; +Cc: linux-kernel@vger.kernel.org, linux-bcache, linux-raid
On Mon, Feb 3, 2014 at 6:34 PM, Ian Pilcher <arequipeno@gmail.com> wrote:
> Shouldn't size_t use %zu?
Technically yes. %zi/%zd prints signed numbers (ssize_t), while %zu prints
unsigned (size_t).
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-02-03 18:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-03 13:49 [PATCH resend 1/2] bcache: Use %zi to format size_t Geert Uytterhoeven
2014-02-03 13:49 ` [PATCH v2 2/2] bcache: Drop L-suffix when comparing ssize_t with 0 Geert Uytterhoeven
2014-02-03 17:34 ` [PATCH resend 1/2] bcache: Use %zi to format size_t Ian Pilcher
2014-02-03 18:49 ` Geert Uytterhoeven
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).