From: Mark Rustad <[email protected]>

Resolve "logical 'and' applied to non-boolean constant" warnings
generated by the expansion of the init_fifo and init_head macros.
Adding a !! resolves the warnings.

Signed-off-by: Mark Rustad <[email protected]>
Signed-off-by: Jeff Kirsher <[email protected]>
---
 drivers/md/bcache/util.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/md/bcache/util.h b/drivers/md/bcache/util.h
index 508f68b..54b160d 100644
--- a/drivers/md/bcache/util.h
+++ b/drivers/md/bcache/util.h
@@ -45,7 +45,7 @@ struct closure;
        (heap)->data = NULL;                                            \
        if (_bytes < KMALLOC_MAX_SIZE)                                  \
                (heap)->data = kmalloc(_bytes, (gfp));                  \
-       if ((!(heap)->data) && ((gfp) & GFP_KERNEL))                    \
+       if ((!(heap)->data) && !!((gfp) & GFP_KERNEL))                  \
                (heap)->data = vmalloc(_bytes);                         \
        (heap)->data;                                                   \
 })
@@ -142,7 +142,7 @@ do {                                                        
                \
                                                                        \
        if (_bytes < KMALLOC_MAX_SIZE)                                  \
                (fifo)->data = kmalloc(_bytes, (gfp));                  \
-       if ((!(fifo)->data) && ((gfp) & GFP_KERNEL))                    \
+       if ((!(fifo)->data) && !!((gfp) & GFP_KERNEL))                  \
                (fifo)->data = vmalloc(_bytes);                         \
        (fifo)->data;                                                   \
 })
-- 
1.9.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to