From patchwork Thu Dec 4 18:12:40 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Becky Bruce X-Patchwork-Id: 12300 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id 77EC8DDE1B for ; Fri, 5 Dec 2008 05:17:51 +1100 (EST) X-Original-To: linuxppc-dev@ozlabs.org Delivered-To: linuxppc-dev@ozlabs.org Received: from az33egw02.freescale.net (az33egw02.freescale.net [192.88.158.103]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "az33egw02.freescale.net", Issuer "Thawte Premium Server CA" (verified OK)) by ozlabs.org (Postfix) with ESMTPS id 1B575DDDED for ; Fri, 5 Dec 2008 05:13:00 +1100 (EST) Received: from az33smr01.freescale.net (az33smr01.freescale.net [10.64.34.199]) by az33egw02.freescale.net (8.14.3/az33egw02) with ESMTP id mB4IChuN007355; Thu, 4 Dec 2008 11:12:44 -0700 (MST) Received: from blarg.am.freescale.net (blarg.am.freescale.net [10.82.19.176]) by az33smr01.freescale.net (8.13.1/8.13.0) with ESMTP id mB4ICg5W013356; Thu, 4 Dec 2008 12:12:42 -0600 (CST) Received: from blarg.am.freescale.net (localhost.localdomain [127.0.0.1]) by blarg.am.freescale.net (8.14.2/8.14.2) with ESMTP id mB4ICfVU009726; Thu, 4 Dec 2008 12:12:41 -0600 Received: (from bgill@localhost) by blarg.am.freescale.net (8.14.2/8.14.2/Submit) id mB4ICewg009723; Thu, 4 Dec 2008 12:12:40 -0600 From: Becky Bruce To: linuxppc-dev@ozlabs.org Subject: [PATCH] powerpc: Fix !CONFIG_PPC_NEED_DMA_SYNC_OPS build warning Date: Thu, 4 Dec 2008 12:12:40 -0600 Message-Id: <1228414360-9699-1-git-send-email-beckyb@kernel.crashing.org> X-Mailer: git-send-email 1.5.6.5 Cc: sfr@canb.auug.org.au, paulus@samba.org X-BeenThere: linuxppc-dev@ozlabs.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org Change #define stubs of dma_sync ops to be empty static inlines to avoid build warning. Signed-off-by: Becky Bruce Acked-by: Stephen Rothwell --- arch/powerpc/include/asm/dma-mapping.h | 41 +++++++++++++++++++++++++++---- 1 files changed, 35 insertions(+), 6 deletions(-) diff --git a/arch/powerpc/include/asm/dma-mapping.h b/arch/powerpc/include/asm/dma-mapping.h index 9063184..86cef7d 100644 --- a/arch/powerpc/include/asm/dma-mapping.h +++ b/arch/powerpc/include/asm/dma-mapping.h @@ -363,12 +363,41 @@ static inline void dma_sync_single_range_for_device(struct device *dev, size, direction); } #else /* CONFIG_PPC_NEED_DMA_SYNC_OPS */ -#define dma_sync_single_for_cpu(d, h, s, dir) ((void)0) -#define dma_sync_single_for_device(d, h, s, dir) ((void)0) -#define dma_sync_single_range_for_cpu(d, h, o, s, dir) ((void)0) -#define dma_sync_single_range_for_device(d, h, o, s, dir) ((void)0) -#define dma_sync_sg_for_cpu(d, s, n, dir) ((void)0) -#define dma_sync_sg_for_device(d, s, n, dir) ((void)0) +static inline void dma_sync_single_for_cpu(struct device *dev, + dma_addr_t dma_handle, size_t size, + enum dma_data_direction direction) +{ +} + +static inline void dma_sync_single_for_device(struct device *dev, + dma_addr_t dma_handle, size_t size, + enum dma_data_direction direction) +{ +} + +static inline void dma_sync_sg_for_cpu(struct device *dev, + struct scatterlist *sgl, int nents, + enum dma_data_direction direction) +{ +} + +static inline void dma_sync_sg_for_device(struct device *dev, + struct scatterlist *sgl, int nents, + enum dma_data_direction direction) +{ +} + +static inline void dma_sync_single_range_for_cpu(struct device *dev, + dma_addr_t dma_handle, unsigned long offset, size_t size, + enum dma_data_direction direction) +{ +} + +static inline void dma_sync_single_range_for_device(struct device *dev, + dma_addr_t dma_handle, unsigned long offset, size_t size, + enum dma_data_direction direction) +{ +} #endif static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr)