[PATCH 2/2] md/bcache: Resolve logical-op warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Mark Rustad <mark.d.rustad@xxxxxxxxx>

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 <mark.d.rustad@xxxxxxxxx>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@xxxxxxxxx>
---
 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-bcache" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux ARM Kernel]     [Linux Filesystem Development]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux