[PATCH 2/2] x86/dma: is_device_dma_capable can be boolean

From: Yaowei Bai
Date: Tue Mar 22 2016 - 21:42:43 EST


This patch makes is_device_dma_capable return bool to improve
readability due to this particular function only using either
one or zero as its return value.

No functional change.

Signed-off-by: Yaowei Bai <baiyaowei@xxxxxxxxxxxxxxxxxxxx>
---
include/linux/dma-mapping.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h
index 5e45cf9..175c20f 100644
--- a/include/linux/dma-mapping.h
+++ b/include/linux/dma-mapping.h
@@ -81,7 +81,7 @@ static inline int valid_dma_direction(int dma_direction)
(dma_direction == DMA_FROM_DEVICE));
}

-static inline int is_device_dma_capable(struct device *dev)
+static inline bool is_device_dma_capable(struct device *dev)
{
return dev->dma_mask != NULL && *dev->dma_mask != DMA_MASK_NONE;
}
--
1.9.1