[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <1409735229-24186-2-git-send-email-jeffrey.t.kirsher@intel.com>
Date: Wed, 3 Sep 2014 02:07:09 -0700
From: Jeff Kirsher <jeffrey.t.kirsher@...el.com>
To: kmo@...erainc.com
Cc: Mark Rustad <mark.d.rustad@...el.com>,
linux-kernel@...r.kernel.org, linux-bcache@...r.kernel.org,
Jeff Kirsher <jeffrey.t.kirsher@...el.com>
Subject: [PATCH 2/2] md/bcache: Resolve logical-op warnings
From: Mark Rustad <mark.d.rustad@...el.com>
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@...el.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@...el.com>
---
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 majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists