From: John Jacques <[email protected]>

Some versions of gcc warn if a bool (in this case the
result of the ending the macro with '!= 0'.  Also
casting to (unsigned long) as this is what the print
formats expect.

Signed-off-by: John Jacques <[email protected]>
---
 include/linux/blkdev.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 5d93a66..cdb7e38 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -621,7 +621,7 @@ static inline void queue_flag_clear(unsigned int flag, 
struct request_queue *q)
 
 #define list_entry_rq(ptr)     list_entry((ptr), struct request, queuelist)
 
-#define rq_data_dir(rq)                (((rq)->cmd_flags & 1) != 0)
+#define rq_data_dir(rq)                (unsigned int)((rq)->cmd_flags & 1)
 
 /*
  * Driver can handle struct request, if it either has an old style
-- 
1.9.1

-- 
_______________________________________________
linux-yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/linux-yocto

Reply via email to