Skip to contentSkip to conversation

dmaengine: xilinx: dpdma: Make symbol 'dpdma_debugfs_reqs' static

PATCH Applied Wei Yongjun 4 participants 5 messages Aug 18, 2020 – Aug 19, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dmaengine: xilinx: dpdma: Make symbol 'dpdma_debugfs_reqs' static

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.

Fixes 1d220435cab3 ("dmaengine: xilinx: dpdma: Add debugfs support")
---
 drivers/dma/xilinx/xilinx_dpdma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/dma/xilinx/xilinx_dpdma.c +1 -1
index 7db70d226e89..81ed1e482878 100644
@@ -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,
Reviewed-by on v1 1/1
#1 lore raw

Hi Wei,

Thanks for the patch.

Quoted 11 lines · Wei Yongjun

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.

Fixes 1d220435cab3 ("dmaengine: xilinx: dpdma: Add debugfs support")

Thanks,
-hyun

Quoted 18 lines
---
 drivers/dma/xilinx/xilinx_dpdma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/dma/xilinx/xilinx_dpdma.c +1 -1
index 7db70d226e89..81ed1e482878 100644
@@ -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,
maintainer Reviewed-by on v1 1/1
#2 lore raw
In reply to Wei Yongjun

Hi Wei,

Thank you for the patch.

Quoted 11 lines · Wei Yongjun

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.

Fixes 1d220435cab3 ("dmaengine: xilinx: dpdma: Add debugfs support")

Looks good to me.

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

Quoted 18 lines
---
 drivers/dma/xilinx/xilinx_dpdma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/dma/xilinx/xilinx_dpdma.c +1 -1
index 7db70d226e89..81ed1e482878 100644
@@ -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,
Signature · 3 lines
Regards,

Laurent Pinchart
maintainer
#3 lore raw
Quoted 17 lines · Laurent Pinchart

Hi Wei,

Thank you for the patch.

Quoted 11 lines · Wei Yongjun

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.

Fixes 1d220435cab3 ("dmaengine: xilinx: dpdma: Add debugfs support")
Quoted 5 lines

Looks good to me.

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

Signature · 1 line
~Vinod
maintainer Applied
#4 lore raw
In reply to Wei Yongjun
Quoted 7 lines · Wei Yongjun

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

Signature · 1 line
~Vinod