Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753546AbbDMLzU (ORCPT ); Mon, 13 Apr 2015 07:55:20 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36306 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752877AbbDMLzM (ORCPT ); Mon, 13 Apr 2015 07:55:12 -0400 From: Denys Vlasenko To: linux-kernel@vger.kernel.org Cc: Denys Vlasenko , FUJITA Tomonori Subject: [PATCH 4/4] deinline dma_unmap_single_attrs() Date: Mon, 13 Apr 2015 13:54:35 +0200 Message-Id: <1428926075-28796-5-git-send-email-dvlasenk@redhat.com> In-Reply-To: <1428926075-28796-1-git-send-email-dvlasenk@redhat.com> References: <1428926075-28796-1-git-send-email-dvlasenk@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2551 Lines: 71 Reduces kernel size by 26947 bytes on allyesconfig build: text data bss dec hex filename 82474018 22255384 20627456 125356858 778cb3a vmlinux3 82447071 22255384 20627456 125329911 77861f7 vmlinux4 Signed-off-by: Denys Vlasenko Cc: FUJITA Tomonori Cc: linux-kernel@vger.kernel.org --- include/asm-generic/dma-mapping-common.h | 16 ++++------------ kernel/dma-mapping-common.c | 14 ++++++++++++++ 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/include/asm-generic/dma-mapping-common.h b/include/asm-generic/dma-mapping-common.h index 688f86b..0684d9c 100644 --- a/include/asm-generic/dma-mapping-common.h +++ b/include/asm-generic/dma-mapping-common.h @@ -12,18 +12,10 @@ dma_addr_t dma_map_single_attrs(struct device *dev, void *ptr, enum dma_data_direction dir, struct dma_attrs *attrs); -static inline void dma_unmap_single_attrs(struct device *dev, dma_addr_t addr, - size_t size, - enum dma_data_direction dir, - struct dma_attrs *attrs) -{ - struct dma_map_ops *ops = get_dma_ops(dev); - - BUG_ON(!valid_dma_direction(dir)); - if (ops->unmap_page) - ops->unmap_page(dev, addr, size, dir, attrs); - debug_dma_unmap_page(dev, addr, size, dir, true); -} +void dma_unmap_single_attrs(struct device *dev, dma_addr_t addr, + size_t size, + enum dma_data_direction dir, + struct dma_attrs *attrs); static inline int dma_map_sg_attrs(struct device *dev, struct scatterlist *sg, int nents, enum dma_data_direction dir, diff --git a/kernel/dma-mapping-common.c b/kernel/dma-mapping-common.c index 17457a4..75e514e 100644 --- a/kernel/dma-mapping-common.c +++ b/kernel/dma-mapping-common.c @@ -31,3 +31,17 @@ dma_addr_t dma_map_single_attrs(struct device *dev, void *ptr, return addr; } EXPORT_SYMBOL(dma_map_single_attrs); + +void dma_unmap_single_attrs(struct device *dev, dma_addr_t addr, + size_t size, + enum dma_data_direction dir, + struct dma_attrs *attrs) +{ + struct dma_map_ops *ops = get_dma_ops(dev); + + BUG_ON(!valid_dma_direction(dir)); + if (ops->unmap_page) + ops->unmap_page(dev, addr, size, dir, attrs); + debug_dma_unmap_page(dev, addr, size, dir, true); +} +EXPORT_SYMBOL(dma_unmap_single_attrs); -- 1.8.1.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/