dmaengine: virt-dma: move function declarations
authorBaoyou Xie <baoyou.xie@linaro.org>
Sat, 24 Sep 2016 04:37:05 +0000 (12:37 +0800)
committerVinod Koul <vinod.koul@intel.com>
Sat, 1 Oct 2016 06:11:39 +0000 (11:41 +0530)
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>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
drivers/dma/virt-dma.h

index a030ae7..3f776a4 100644 (file)
@@ -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);