From: Andreas Gruenbacher <agruenba@redhat.com>
To: gfs2@lists.linux.dev
Cc: Andreas Gruenbacher <agruenba@redhat.com>,
Adrian Garcia Casado <adriangarciacasado42@gmail.com>
Subject: [PATCH 6/6] gfs2: Silence sparse signedness warning
Date: Thu, 20 Aug 2026 16:21:27 +0200 [thread overview]
Message-ID: <20260820142129.1327413-7-agruenba@redhat.com> (raw)
In-Reply-To: <20260820142129.1327413-1-agruenba@redhat.com>
Silence the following sparse warning:
fs/gfs2/bmap.c:1718:42: warning: unsigned value that used to be signed checked against zero?
fs/gfs2/bmap.c:2017:16: signed value source
It's unclear to me what sparse is trying to tell me there, but making the
height variables unsigned shuts it up.
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
---
fs/gfs2/bmap.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c
index b5ddd936f489..3714364385c7 100644
--- a/fs/gfs2/bmap.c
+++ b/fs/gfs2/bmap.c
@@ -1699,7 +1699,7 @@ enum dealloc_states {
};
static inline void
-metapointer_range(struct metapath *mp, int height,
+metapointer_range(struct metapath *mp, unsigned int height,
__u16 *start_list, unsigned int start_aligned,
__u16 *end_list, unsigned int end_aligned,
__be64 **start, __be64 **end)
@@ -1770,7 +1770,7 @@ static int punch_hole(struct gfs2_inode *ip, u64 offset, u64 length)
unsigned int strip_h = ip->i_height - 1;
u32 btotal = 0;
int ret, state;
- int mp_h; /* metapath buffers are read in to this height */
+ unsigned int mp_h; /* metapath buffers are read in to this height */
u64 prev_bnr = 0;
__be64 *start, *end;
--
2.55.0
prev parent reply other threads:[~2026-08-20 14:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-20 14:21 [PATCH 0/6] gfs2: silence sparse Andreas Gruenbacher
2026-08-20 14:21 ` [PATCH 1/6] gfs2: Avoid ip->i_gl dereferences in gfs2_inode_lookup and gfs2_create_inode Andreas Gruenbacher
2026-08-20 14:21 ` [PATCH 2/6] gfs2: Get to super block from inode in tracepoints Andreas Gruenbacher
2026-08-20 14:21 ` [PATCH 3/6] gfs2: Add inode variables Andreas Gruenbacher
2026-08-20 14:21 ` [PATCH 4/6] gfs2: Introduce gfs2_inode_glock Andreas Gruenbacher
2026-08-20 14:21 ` [PATCH 5/6] gfs2: annotate i_gl with __rcu Andreas Gruenbacher
2026-08-20 14:21 ` Andreas Gruenbacher [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260820142129.1327413-7-agruenba@redhat.com \
--to=agruenba@redhat.com \
--cc=adriangarciacasado42@gmail.com \
--cc=gfs2@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox