Skip to content

Commit 543dfb2

Browse files
d4ddi0torvalds
authored andcommitted
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>
1 parent 8463833 commit 543dfb2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/linux/gfp.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ static inline int gfpflags_to_migratetype(const gfp_t gfp_flags)
278278

279279
static inline bool gfpflags_allow_blocking(const gfp_t gfp_flags)
280280
{
281-
return (bool __force)(gfp_flags & __GFP_DIRECT_RECLAIM);
281+
return !!(gfp_flags & __GFP_DIRECT_RECLAIM);
282282
}
283283

284284
#ifdef CONFIG_HIGHMEM

0 commit comments

Comments
 (0)