diff mbox series

[-next] dmaengine: xilinx: dpdma: Make symbol 'dpdma_debugfs_reqs' static

Message ID 20200818112217.43816-1-weiyongjun1@huawei.com (mailing list archive)
State New, archived
Headers show
Series [-next] dmaengine: xilinx: dpdma: Make symbol 'dpdma_debugfs_reqs' static | expand

Commit Message

Wei Yongjun Aug. 18, 2020, 11:22 a.m. UTC
The sparse tool complains as follows:

drivers/dma/xilinx/xilinx_dpdma.c:349:37: warning:
 symbol 'dpdma_debugfs_reqs' was not declared. Should it be static?

This variable is not used outside of xilinx_dpdma.c, so this commit
marks it static.

Reported-by: Hulk Robot <hulkci@huawei.com>
Fixes: 1d220435cab3 ("dmaengine: xilinx: dpdma: Add debugfs support")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/dma/xilinx/xilinx_dpdma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Hyun Kwon Aug. 18, 2020, 7:32 p.m. UTC | #1
Hi Wei,

Thanks for the patch.

On Tue, Aug 18, 2020 at 04:22:17AM -0700, Wei Yongjun wrote:
> The sparse tool complains as follows:
> 
> drivers/dma/xilinx/xilinx_dpdma.c:349:37: warning:
>  symbol 'dpdma_debugfs_reqs' was not declared. Should it be static?
> 
> This variable is not used outside of xilinx_dpdma.c, so this commit
> marks it static.
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Fixes: 1d220435cab3 ("dmaengine: xilinx: dpdma: Add debugfs support")
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>

Reviewed-by: Hyun Kwon <hyun.kwon@xilinx.com>

Thanks,
-hyun

> ---
>  drivers/dma/xilinx/xilinx_dpdma.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/dma/xilinx/xilinx_dpdma.c b/drivers/dma/xilinx/xilinx_dpdma.c
> index 7db70d226e89..81ed1e482878 100644
> --- a/drivers/dma/xilinx/xilinx_dpdma.c
> +++ b/drivers/dma/xilinx/xilinx_dpdma.c
> @@ -346,7 +346,7 @@ static int xilinx_dpdma_debugfs_desc_done_irq_write(char *args)
>  }
>  
>  /* Match xilinx_dpdma_testcases vs dpdma_debugfs_reqs[] entry */
> -struct xilinx_dpdma_debugfs_request dpdma_debugfs_reqs[] = {
> +static struct xilinx_dpdma_debugfs_request dpdma_debugfs_reqs[] = {
>  	{
>  		.name = "DESCRIPTOR_DONE_INTR",
>  		.tc = DPDMA_TC_INTR_DONE,
>
Laurent Pinchart Aug. 18, 2020, 11:41 p.m. UTC | #2
Hi Wei,

Thank you for the patch.

On Tue, Aug 18, 2020 at 07:22:17PM +0800, Wei Yongjun wrote:
> The sparse tool complains as follows:
> 
> drivers/dma/xilinx/xilinx_dpdma.c:349:37: warning:
>  symbol 'dpdma_debugfs_reqs' was not declared. Should it be static?
> 
> This variable is not used outside of xilinx_dpdma.c, so this commit
> marks it static.
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Fixes: 1d220435cab3 ("dmaengine: xilinx: dpdma: Add debugfs support")
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>

Looks good to me.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

Vinod, could you pick this up as a v5.9 fix ?

> ---
>  drivers/dma/xilinx/xilinx_dpdma.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/dma/xilinx/xilinx_dpdma.c b/drivers/dma/xilinx/xilinx_dpdma.c
> index 7db70d226e89..81ed1e482878 100644
> --- a/drivers/dma/xilinx/xilinx_dpdma.c
> +++ b/drivers/dma/xilinx/xilinx_dpdma.c
> @@ -346,7 +346,7 @@ static int xilinx_dpdma_debugfs_desc_done_irq_write(char *args)
>  }
>  
>  /* Match xilinx_dpdma_testcases vs dpdma_debugfs_reqs[] entry */
> -struct xilinx_dpdma_debugfs_request dpdma_debugfs_reqs[] = {
> +static struct xilinx_dpdma_debugfs_request dpdma_debugfs_reqs[] = {
>  	{
>  		.name = "DESCRIPTOR_DONE_INTR",
>  		.tc = DPDMA_TC_INTR_DONE,
>
Vinod Koul Aug. 19, 2020, 4:24 a.m. UTC | #3
On 18-08-20, 19:22, Wei Yongjun wrote:
> The sparse tool complains as follows:
> 
> drivers/dma/xilinx/xilinx_dpdma.c:349:37: warning:
>  symbol 'dpdma_debugfs_reqs' was not declared. Should it be static?
> 
> This variable is not used outside of xilinx_dpdma.c, so this commit
> marks it static.

Applied, thanks
Vinod Koul Aug. 19, 2020, 4:26 a.m. UTC | #4
On 19-08-20, 02:41, Laurent Pinchart wrote:
> Hi Wei,
> 
> Thank you for the patch.
> 
> On Tue, Aug 18, 2020 at 07:22:17PM +0800, Wei Yongjun wrote:
> > The sparse tool complains as follows:
> > 
> > drivers/dma/xilinx/xilinx_dpdma.c:349:37: warning:
> >  symbol 'dpdma_debugfs_reqs' was not declared. Should it be static?
> > 
> > This variable is not used outside of xilinx_dpdma.c, so this commit
> > marks it static.
> > 
> > Reported-by: Hulk Robot <hulkci@huawei.com>
> > Fixes: 1d220435cab3 ("dmaengine: xilinx: dpdma: Add debugfs support")
> > Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> 
> Looks good to me.
> 
> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> 
> Vinod, could you pick this up as a v5.9 fix ?

This is not 5.9 fix. The debugfs patch will go into next for 5.10 so
this is applied to next as well
diff mbox series

Patch

diff --git a/drivers/dma/xilinx/xilinx_dpdma.c b/drivers/dma/xilinx/xilinx_dpdma.c
index 7db70d226e89..81ed1e482878 100644
--- a/drivers/dma/xilinx/xilinx_dpdma.c
+++ b/drivers/dma/xilinx/xilinx_dpdma.c
@@ -346,7 +346,7 @@  static int xilinx_dpdma_debugfs_desc_done_irq_write(char *args)
 }
 
 /* Match xilinx_dpdma_testcases vs dpdma_debugfs_reqs[] entry */
-struct xilinx_dpdma_debugfs_request dpdma_debugfs_reqs[] = {
+static struct xilinx_dpdma_debugfs_request dpdma_debugfs_reqs[] = {
 	{
 		.name = "DESCRIPTOR_DONE_INTR",
 		.tc = DPDMA_TC_INTR_DONE,