summaryrefslogtreecommitdiff
path: root/include/linux/gfp.h
diff options
context:
space:
mode:
authorJoshua Clayton <stillcompiling@gmail.com>2016-01-15 02:22:10 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2016-01-15 03:00:49 +0300
commit543dfb2df8ebb3eb0b499eae1d63de1701a99b40 (patch)
tree07fa19486636a026e8ab33549671018027dcdff3 /include/linux/gfp.h
parent84638335900f1995495838fe1bd4870c43ec1f67 (diff)
downloadlinux-543dfb2df8ebb3eb0b499eae1d63de1701a99b40.tar.xz
mm: fix noisy sparse warning in LIBCFS_ALLOC_PRE()
Running sparse on drivers/staging/lustre results in dozens of warnings: include/linux/gfp.h:281:41: warning: odd constant _Bool cast (400000 becomes 1) Use "!!" to explicitly convert to bool and get rid of the warning. Signed-off-by: Joshua Clayton <stillcompiling@gmail.com> Cc: Mel Gorman <mgorman@techsingularity.net> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/gfp.h')
-rw-r--r--include/linux/gfp.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/gfp.h b/include/linux/gfp.h
index 91f74e741aa2..28ad5f6494b0 100644
--- a/include/linux/gfp.h
+++ b/include/linux/gfp.h
@@ -278,7 +278,7 @@ static inline int gfpflags_to_migratetype(const gfp_t gfp_flags)
static inline bool gfpflags_allow_blocking(const gfp_t gfp_flags)
{
- return (bool __force)(gfp_flags & __GFP_DIRECT_RECLAIM);
+ return !!(gfp_flags & __GFP_DIRECT_RECLAIM);
}
#ifdef CONFIG_HIGHMEM