From: Joshua Clayton Date: Thu, 14 Jan 2016 23:22:10 +0000 (-0800) Subject: mm: fix noisy sparse warning in LIBCFS_ALLOC_PRE() X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=543dfb2df8ebb3eb0b499eae1d63de1701a99b40;p=linux-beck.git 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 Cc: Mel Gorman Cc: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- 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