From 6a0f414e2018fe7a2b001fbc8ccd4a8f4f946214 Mon Sep 17 00:00:00 2001 From: Brett Holman Date: Sat, 16 Oct 2021 19:13:53 -0600 Subject: [PATCH] bcachefs: Fix compiler warnings Type size_t is architecture-specific. Fix warnings for some non-amd64 arches. Signed-off-by: Brett Holman Signed-off-by: Kent Overstreet --- fs/bcachefs/journal_reclaim.c | 2 +- fs/bcachefs/subvolume.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/bcachefs/journal_reclaim.c b/fs/bcachefs/journal_reclaim.c index 54d8e2f32a37e..0bc4681ccc24a 100644 --- a/fs/bcachefs/journal_reclaim.c +++ b/fs/bcachefs/journal_reclaim.c @@ -653,7 +653,7 @@ static int __bch2_journal_reclaim(struct journal *j, bool direct) atomic_long_read(&c->btree_key_cache.nr_dirty), atomic_long_read(&c->btree_key_cache.nr_keys)); - min_key_cache = min(bch2_nr_btree_keys_need_flush(c), 128UL); + min_key_cache = min(bch2_nr_btree_keys_need_flush(c), (size_t) 128); nr_flushed = journal_flush_pins(j, seq_to_flush, min_nr, min_key_cache); diff --git a/fs/bcachefs/subvolume.h b/fs/bcachefs/subvolume.h index ed02b982ff96f..f98c8c0dbea20 100644 --- a/fs/bcachefs/subvolume.h +++ b/fs/bcachefs/subvolume.h @@ -75,7 +75,7 @@ static inline void snapshots_seen_init(struct snapshots_seen *s) static inline int snapshots_seen_add(struct bch_fs *c, struct snapshots_seen *s, u32 id) { if (s->nr == s->size) { - size_t new_size = max(s->size, 128UL) * 2; + size_t new_size = max(s->size, (size_t) 128) * 2; u32 *d = krealloc(s->d, new_size * sizeof(s->d[0]), GFP_KERNEL); if (!d) { -- 2.30.2