From: Christoph Hellwig <hch@lst.de>
To: xfs@oss.sgi.com
Subject: [PATCH] fix sparse warning in kmem_shake_allow
Date: Sat, 14 Jul 2007 18:06:04 +0200 [thread overview]
Message-ID: <20070714160604.GB7768@lst.de> (raw)
We can't returned a masked result of a __bitwise type. Compare it to
0 first to keep the behaviour without the warning.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Index: linux-2.6-xfs/fs/xfs/linux-2.6/kmem.h
===================================================================
--- linux-2.6-xfs.orig/fs/xfs/linux-2.6/kmem.h 2007-07-14 16:00:28.000000000 +0200
+++ linux-2.6-xfs/fs/xfs/linux-2.6/kmem.h 2007-07-14 16:00:38.000000000 +0200
@@ -103,7 +103,7 @@ extern void *kmem_zone_zalloc(kmem_zone_
static inline int
kmem_shake_allow(gfp_t gfp_mask)
{
- return (gfp_mask & __GFP_WAIT);
+ return (gfp_mask & __GFP_WAIT) != 0;
}
#endif /* __XFS_SUPPORT_KMEM_H__ */
next reply other threads:[~2007-07-14 16:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-14 16:06 Christoph Hellwig [this message]
2007-07-14 16:39 ` [PATCH] fix sparse warning in kmem_shake_allow Eric Sandeen
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=20070714160604.GB7768@lst.de \
--to=hch@lst.de \
--cc=xfs@oss.sgi.com \
/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