Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753628AbcCWBml (ORCPT ); Tue, 22 Mar 2016 21:42:41 -0400 Received: from cmccmta2.chinamobile.com ([221.176.66.80]:2416 "EHLO cmccmta2.chinamobile.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752773AbcCWBmf (ORCPT ); Tue, 22 Mar 2016 21:42:35 -0400 X-RM-TRANSID: 2ee856f1f483225-9e535 X-RM-SPAM-FLAG: 00000000 X-RM-TRANSID: 2ee356f1f4825e6-ac82d From: Yaowei Bai To: tglx@linutronix.de, mingo@kernel.org, hpa@zytor.com Cc: x86@kernel.org, linux-kernel@vger.kernel.org, baiyaowei@cmss.chinamobile.com Subject: [PATCH 2/2] x86/dma: is_device_dma_capable can be boolean Date: Wed, 23 Mar 2016 09:40:10 +0800 Message-Id: <1458697210-3027-2-git-send-email-baiyaowei@cmss.chinamobile.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1458697210-3027-1-git-send-email-baiyaowei@cmss.chinamobile.com> References: <1458697210-3027-1-git-send-email-baiyaowei@cmss.chinamobile.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 825 Lines: 28 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 --- 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