public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] dmaengine: virt-dma: move function declarations
@ 2016-09-24  4:37 Baoyou Xie
  2016-09-24  9:07 ` Arnd Bergmann
  2016-10-01  6:12 ` Vinod Koul
  0 siblings, 2 replies; 3+ messages in thread
From: Baoyou Xie @ 2016-09-24  4:37 UTC (permalink / raw)
  To: dan.j.williams, vinod.koul
  Cc: dmaengine, linux-kernel, arnd, baoyou.xie, xie.baoyou

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 <baoyou.xie@linaro.org>
---
 drivers/dma/virt-dma.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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);
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/3] dmaengine: virt-dma: move function declarations
  2016-09-24  4:37 [PATCH 1/3] dmaengine: virt-dma: move function declarations Baoyou Xie
@ 2016-09-24  9:07 ` Arnd Bergmann
  2016-10-01  6:12 ` Vinod Koul
  1 sibling, 0 replies; 3+ messages in thread
From: Arnd Bergmann @ 2016-09-24  9:07 UTC (permalink / raw)
  To: Baoyou Xie
  Cc: dan.j.williams, vinod.koul, dmaengine, linux-kernel, xie.baoyou

On Saturday, September 24, 2016 12:37:05 PM CEST Baoyou Xie wrote:
> 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 <baoyou.xie@linaro.org>
> 

Acked-by: Arnd Bergmann <arnd@arndb.de>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/3] dmaengine: virt-dma: move function declarations
  2016-09-24  4:37 [PATCH 1/3] dmaengine: virt-dma: move function declarations Baoyou Xie
  2016-09-24  9:07 ` Arnd Bergmann
@ 2016-10-01  6:12 ` Vinod Koul
  1 sibling, 0 replies; 3+ messages in thread
From: Vinod Koul @ 2016-10-01  6:12 UTC (permalink / raw)
  To: Baoyou Xie; +Cc: dan.j.williams, dmaengine, linux-kernel, arnd, xie.baoyou

On Sat, Sep 24, 2016 at 12:37:05PM +0800, Baoyou Xie wrote:
> 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.

Applied, thanks

-- 
~Vinod

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-10-01  6:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-24  4:37 [PATCH 1/3] dmaengine: virt-dma: move function declarations Baoyou Xie
2016-09-24  9:07 ` Arnd Bergmann
2016-10-01  6:12 ` Vinod Koul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox