* [PATCH 2/3] dmaengine: pxa_dma: add function declaration
@ 2016-09-24 4:58 Baoyou Xie
2016-09-24 9:05 ` Arnd Bergmann
0 siblings, 1 reply; 2+ messages in thread
From: Baoyou Xie @ 2016-09-24 4:58 UTC (permalink / raw)
To: dan.j.williams, vinod.koul
Cc: dmaengine, linux-kernel, arnd, baoyou.xie, xie.baoyou
We get 1 warning when building kernel with W=1:
drivers/dma/pxa_dma.c:1525:5: warning: no previous prototype for 'pxad_toggle_reserved_channel' [-Wmissing-prototypes]
In fact, this function is undeclared in any header files.
So this patch adds function declaration in include/linux/dma/pxa-dma.h.
Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org>
---
include/linux/dma/pxa-dma.h | 1 ++++++
1 file changed, 1 insertions(+)
diff --git a/include/linux/dma/pxa-dma.h b/include/linux/dma/pxa-dma.h
index 3edc992..1823257 100644
--- a/include/linux/dma/pxa-dma.h
+++ b/include/linux/dma/pxa-dma.h
@@ -17,6 +17,7 @@ struct dma_chan;
#ifdef CONFIG_PXA_DMA
bool pxad_filter_fn(struct dma_chan *chan, void *param);
+int pxad_toggle_reserved_channel(int legacy_channel);
#else
static inline bool pxad_filter_fn(struct dma_chan *chan, void *param)
{
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 2/3] dmaengine: pxa_dma: add function declaration
2016-09-24 4:58 [PATCH 2/3] dmaengine: pxa_dma: add function declaration Baoyou Xie
@ 2016-09-24 9:05 ` Arnd Bergmann
0 siblings, 0 replies; 2+ messages in thread
From: Arnd Bergmann @ 2016-09-24 9:05 UTC (permalink / raw)
To: Baoyou Xie
Cc: dan.j.williams, vinod.koul, dmaengine, linux-kernel, xie.baoyou
On Saturday, September 24, 2016 12:58:39 PM CEST Baoyou Xie wrote:
> We get 1 warning when building kernel with W=1:
> drivers/dma/pxa_dma.c:1525:5: warning: no previous prototype for 'pxad_toggle_reserved_channel' [-Wmissing-prototypes]
>
> In fact, this function is undeclared in any header files.
>
> So this patch adds function declaration in include/linux/dma/pxa-dma.h.
>
> Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org>
>
No, this is wrong: the function was originally introduced as the
interface between drivers/dma/pxa_dma.c and arch/arm/plat-pxa/dma.c,
but the latter file has been removed recently, along with the
declaration.
Please remove the function as well now.
In the future, when you find an exported function without a
declaration, don't assume that it should be declared, but instead
look up the git history of that identifier to see if the users
were all removed, or if it was perhaps never used.
Arnd
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-09-24 9:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-24 4:58 [PATCH 2/3] dmaengine: pxa_dma: add function declaration Baoyou Xie
2016-09-24 9:05 ` Arnd Bergmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox