From patchwork Sat Sep 24 04:37:05 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baoyou Xie X-Patchwork-Id: 76910 Delivered-To: patch@linaro.org Received: by 10.140.106.72 with SMTP id d66csp185274qgf; Fri, 23 Sep 2016 21:37:24 -0700 (PDT) X-Received: by 10.98.52.6 with SMTP id b6mr15678924pfa.53.1474691843963; Fri, 23 Sep 2016 21:37:23 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ln2si11421699pab.23.2016.09.23.21.37.23; Fri, 23 Sep 2016 21:37:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932799AbcIXEhU (ORCPT + 27 others); Sat, 24 Sep 2016 00:37:20 -0400 Received: from mail-pa0-f50.google.com ([209.85.220.50]:35085 "EHLO mail-pa0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752345AbcIXEhS (ORCPT ); Sat, 24 Sep 2016 00:37:18 -0400 Received: by mail-pa0-f50.google.com with SMTP id oz2so45950798pac.2 for ; Fri, 23 Sep 2016 21:37:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=4meUAJBskyGuPU0bRSQTklNTbA0xQUcJPSnVx0RitLI=; b=khaYlIr1Rl6hpbzPS3trSbTxZ7SnnE18cglDrQYEZW6cxNJZLuq0D0ydzS4HmSrpfX JLj51LknFPmMqmY9AnCML/GJLiTLpa0i+CAeSnW9JMmr7AEKeEjcJS8PgOGnyYxqBA/6 5kZDPWLiyAAz5rhz4V7qkTatztX8CHjD2GR98= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=4meUAJBskyGuPU0bRSQTklNTbA0xQUcJPSnVx0RitLI=; b=PYh+jHd0eAZR7DJnKf7wss1jZrOatwsH2C4+zJSteGMsAlfy1noOIzxOf4WDdi751P peqI1px/zaG9ImhsKLRHeXVA63GdCvYwjucFQ3NpFShGy1iqncTCIwX41R0Bnz2aUy9q Is+RYpGEDBtLwnlY30HjRjKSdtf1klH1mWcmC36wFxr3QWZpYMjEVX+lGmrd1nhFPsNo BvQw0GaFW4v/WX2NX4RR8xyeR1LOW2eLb5WmiEjKyu+nHhYuKbKm4boOepA7F4C76/EJ y+y+e1jkRqBbxtCFZEKnO7sODemLsfmDkWI/DCvTdR+z4o4Frafvy9YdreA6qaMmj88A z6/Q== X-Gm-Message-State: AE9vXwMMGyzs2nFW6WuKeicisLetGkqTyAH4QB8KgapqZDScY5DsLeIDSIowu2rhOZ3j0+J9 X-Received: by 10.66.10.102 with SMTP id h6mr18671545pab.112.1474691837667; Fri, 23 Sep 2016 21:37:17 -0700 (PDT) Received: from localhost.localdomain ([45.56.152.27]) by smtp.gmail.com with ESMTPSA id b88sm14752159pfe.66.2016.09.23.21.37.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 23 Sep 2016 21:37:17 -0700 (PDT) From: Baoyou Xie To: dan.j.williams@intel.com, vinod.koul@intel.com Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, arnd@arndb.de, baoyou.xie@linaro.org, xie.baoyou@zte.com.cn Subject: [PATCH 1/3] dmaengine: virt-dma: move function declarations Date: Sat, 24 Sep 2016 12:37:05 +0800 Message-Id: <1474691825-15068-1-git-send-email-baoyou.xie@linaro.org> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We get 2 warnings when building kernel with W=1: drivers/dma/virt-dma.c:22:14: warning: no previous prototype for 'vchan_tx_submit' [-Wmissing-prototypes] drivers/dma/virt-dma.c:52:5: warning: no previous prototype for 'vchan_tx_desc_free' [-Wmissing-prototypes] In fact, these two functions are incorrectly declared in a function. So this patch moves function declarations out of this function. Signed-off-by: Baoyou Xie --- drivers/dma/virt-dma.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.7.4 Acked-by: Arnd Bergmann diff --git a/drivers/dma/virt-dma.h b/drivers/dma/virt-dma.h index a030ae7..3f776a4 100644 --- a/drivers/dma/virt-dma.h +++ b/drivers/dma/virt-dma.h @@ -45,6 +45,8 @@ static inline struct virt_dma_chan *to_virt_chan(struct dma_chan *chan) void vchan_dma_desc_free_list(struct virt_dma_chan *vc, struct list_head *head); void vchan_init(struct virt_dma_chan *vc, struct dma_device *dmadev); struct virt_dma_desc *vchan_find_desc(struct virt_dma_chan *, dma_cookie_t); +extern dma_cookie_t vchan_tx_submit(struct dma_async_tx_descriptor *); +extern int vchan_tx_desc_free(struct dma_async_tx_descriptor *); /** * vchan_tx_prep - prepare a descriptor @@ -55,8 +57,6 @@ struct virt_dma_desc *vchan_find_desc(struct virt_dma_chan *, dma_cookie_t); static inline struct dma_async_tx_descriptor *vchan_tx_prep(struct virt_dma_chan *vc, struct virt_dma_desc *vd, unsigned long tx_flags) { - extern dma_cookie_t vchan_tx_submit(struct dma_async_tx_descriptor *); - extern int vchan_tx_desc_free(struct dma_async_tx_descriptor *); unsigned long flags; dma_async_tx_descriptor_init(&vd->tx, &vc->chan);