linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [bug report] xfs: pass the goal of the incore inode walk to xfs_inode_walk()
@ 2021-08-12  6:42 Dan Carpenter
  2021-08-12 21:40 ` Dave Chinner
  0 siblings, 1 reply; 7+ messages in thread
From: Dan Carpenter @ 2021-08-12  6:42 UTC (permalink / raw)
  To: djwong; +Cc: linux-xfs

Hello Darrick J. Wong,

The patch c809d7e948a1: "xfs: pass the goal of the incore inode walk
to xfs_inode_walk()" from Jun 1, 2021, leads to the following
Smatch static checker warning:

	fs/xfs/xfs_icache.c:52 xfs_icwalk_tag()
	warn: unsigned 'goal' is never less than zero.

fs/xfs/xfs_icache.c
    49 static inline unsigned int
    50 xfs_icwalk_tag(enum xfs_icwalk_goal goal)
    51 {
--> 52 	return goal < 0 ? XFS_ICWALK_NULL_TAG : goal;

This enum will be unsigned in GCC, so "goal" can't be negative.  Plus
we only pass 0-1 for goal (as far as Smatch can tell).

    53 }

regards,
dan carpenter

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-08-13  8:15 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-12  6:42 [bug report] xfs: pass the goal of the incore inode walk to xfs_inode_walk() Dan Carpenter
2021-08-12 21:40 ` Dave Chinner
2021-08-12 22:41   ` Darrick J. Wong
2021-08-12 23:57     ` Dave Chinner
2021-08-13  8:12       ` Dan Carpenter
2021-08-13  7:38   ` Dan Carpenter
2021-08-13  8:15     ` Christoph Hellwig

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).