All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@sandeen.net>
To: Christoph Hellwig <hch@lst.de>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH] fix sparse warning in kmem_shake_allow
Date: Sat, 14 Jul 2007 11:39:16 -0500	[thread overview]
Message-ID: <4698FC34.6090001@sandeen.net> (raw)
In-Reply-To: <20070714160604.GB7768@lst.de>

Christoph Hellwig wrote:
> We can't returned a masked result of a __bitwise type.  Compare it to
> 0 first to keep the behaviour without the warning.
> 

I wonder if this warrants a comment about sparse to keep it
from disappearing again later...

-Eric

> 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__ */
> 
> 

      reply	other threads:[~2007-07-14 16:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-14 16:06 [PATCH] fix sparse warning in kmem_shake_allow Christoph Hellwig
2007-07-14 16:39 ` Eric Sandeen [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=4698FC34.6090001@sandeen.net \
    --to=sandeen@sandeen.net \
    --cc=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.