From: Brett Holman Date: Sun, 17 Oct 2021 01:13:53 +0000 (-0600) Subject: bcachefs: Fix compiler warnings X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=6a0f414e2018fe7a2b001fbc8ccd4a8f4f946214;p=users%2Fjedix%2Flinux-maple.git 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 --- diff --git a/fs/bcachefs/journal_reclaim.c b/fs/bcachefs/journal_reclaim.c index 54d8e2f32a37..0bc4681ccc24 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 ed02b982ff96..f98c8c0dbea2 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) {