Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1363159

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

From Yaowei Bai <baiyaowei@cmss.chinamobile.com>
Newsgroups linux.kernel
Subject [PATCH 2/2] x86/dma: is_device_dma_capable can be boolean
Date 2016-03-23 02:50 +0100
Message-ID <rfG5Q-4yd-5@gated-at.bofh.it> (permalink)
References <rfG5Q-4yd-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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@cmss.chinamobile.com>
---
 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

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH 2/2] x86/dma: is_device_dma_capable can be boolean Yaowei Bai <baiyaowei@cmss.chinamobile.com> - 2016-03-23 02:50 +0100

csiph-web