From patchwork Thu Nov 29 22:24:27 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Hunter, Jon" X-Patchwork-Id: 1823031 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id F15953FC5A for ; Thu, 29 Nov 2012 22:24:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753086Ab2K2WYw (ORCPT ); Thu, 29 Nov 2012 17:24:52 -0500 Received: from bear.ext.ti.com ([192.94.94.41]:60018 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751384Ab2K2WYw (ORCPT ); Thu, 29 Nov 2012 17:24:52 -0500 Received: from dlelxv30.itg.ti.com ([172.17.2.17]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id qATMOYbC013614; Thu, 29 Nov 2012 16:24:34 -0600 Received: from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110]) by dlelxv30.itg.ti.com (8.13.8/8.13.8) with ESMTP id qATMOYCn019487; Thu, 29 Nov 2012 16:24:34 -0600 Received: from dlelxv24.itg.ti.com (172.17.1.199) by dfle73.ent.ti.com (128.247.5.110) with Microsoft SMTP Server id 14.1.323.3; Thu, 29 Nov 2012 16:24:34 -0600 Received: from legion.dal.design.ti.com (legion.dal.design.ti.com [128.247.22.53]) by dlelxv24.itg.ti.com (8.13.8/8.13.8) with ESMTP id qATMOXqM018769; Thu, 29 Nov 2012 16:24:33 -0600 Received: from localhost (ula0741266.am.dhcp.ti.com [192.157.144.139]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id qATMOXw16819; Thu, 29 Nov 2012 16:24:33 -0600 (CST) From: Jon Hunter To: Vinod Koul CC: device-tree , linux-omap , linux-arm , Rob Herring , Grant Likely , Fengguang Wu , Jon Hunter Subject: [PATCH] of: dma: Fix-up for warnings !CONFIG_OF Date: Thu, 29 Nov 2012 16:24:27 -0600 Message-ID: <1354227867-13357-1-git-send-email-jon-hunter@ti.com> X-Mailer: git-send-email 1.7.10.4 MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org When compiling the kernel with DMA engine support enabled and device-tree support disabled, the following warnings are observed. In file included from drivers/dma/dmaengine.c:65:0: include/linux/of_dma.h: In function 'of_dma_controller_free': include/linux/of_dma.h:57:1: warning: no return statement in function returning non-void [-Wreturn-type] drivers/dma/dmaengine.c: At top level: include/linux/of_dma.h:47:12: warning: 'of_dma_controller_register' defined but not used [-Wunused-function] include/linux/of_dma.h:55:12: warning: 'of_dma_controller_free' defined but not used [-Wunused-function] include/linux/of_dma.h:65:25: warning: 'of_dma_simple_xlate' defined but not used [-Wunused-function] Fix-up the warnings by adding a return value for the of_dma_controller_free() stub and make all the stubs static inline to avoid the unused warnings. Reported-by: Fengguang Wu Signed-off-by: Jon Hunter --- include/linux/of_dma.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/include/linux/of_dma.h b/include/linux/of_dma.h index 84b64f8..b14a34f 100644 --- a/include/linux/of_dma.h +++ b/include/linux/of_dma.h @@ -44,7 +44,7 @@ extern struct dma_chan *of_dma_request_slave_channel(struct device_node *np, extern struct dma_chan *of_dma_simple_xlate(struct of_phandle_args *dma_spec, struct of_dma *ofdma); #else -static int of_dma_controller_register(struct device_node *np, +static inline int of_dma_controller_register(struct device_node *np, struct dma_chan *(*of_dma_xlate) (struct of_phandle_args *, struct of_dma *), void *data) @@ -52,18 +52,19 @@ static int of_dma_controller_register(struct device_node *np, return -ENODEV; } -static int of_dma_controller_free(struct device_node *np) +static inline int of_dma_controller_free(struct device_node *np) { + return 0; } -static struct dma_chan *of_dma_request_slave_channel(struct device_node *np, - char *name) +static inline struct dma_chan *of_dma_request_slave_channel( + struct device_node *np, char *name) { return NULL; } -static struct dma_chan *of_dma_simple_xlate(struct of_phandle_args *dma_spec, - struct of_dma *ofdma) +static inline struct dma_chan *of_dma_simple_xlate( + struct of_phandle_args *dma_spec, struct of_dma *ofdma) { return NULL; }