Skip to contentSkip to conversation

dmaengine: ti: omap-dma: Drop of_match_ptr to fix -Wunused-const-variable

PATCH Applied Krzysztof Kozlowski 3 participants 3 messages Jul 28, 2020 – Aug 17, 2020

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

PATCH 1/1 dmaengine: ti: omap-dma: Drop of_match_ptr to fix -Wunused-const-variable

The of_device_id is included unconditionally by of.h header and used in the driver as well. Remove of_match_ptr to fix W=1 compile test warning with !CONFIG_OF:

drivers/dma/ti/omap-dma.c:1892:34: warning: 'omap_dma_match' defined but not used [-Wunused-const-variable=]
1892 | static const struct of_device_id omap_dma_match[] = {

---
 drivers/dma/ti/omap-dma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/dma/ti/omap-dma.c +1 -1
index 918301e17552..c9fe5e3a6b55 100644
@@ -1904,7 +1904,7 @@ static struct platform_driver omap_dma_driver = {
 	.remove	= omap_dma_remove,
 	.driver = {
 		.name = "omap-dma-engine",
-		.of_match_table = of_match_ptr(omap_dma_match),
+		.of_match_table = omap_dma_match,
 	},
 };
 
Signature · 1 line
2.17.1
Reviewed-by on v1 1/1
#1 lore raw

Hi Krzysztof,

Thank you for the patch.

Quoted 8 lines · Krzysztof Kozlowski

The of_device_id is included unconditionally by of.h header and used in the driver as well. Remove of_match_ptr to fix W=1 compile test warning with !CONFIG_OF:

drivers/dma/ti/omap-dma.c:1892:34: warning: 'omap_dma_match' defined but not used [-Wunused-const-variable=]
1892 | static const struct of_device_id omap_dma_match[] = {

Quoted 17 lines
---
 drivers/dma/ti/omap-dma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/dma/ti/omap-dma.c +1 -1
index 918301e17552..c9fe5e3a6b55 100644
@@ -1904,7 +1904,7 @@ static struct platform_driver omap_dma_driver = {
 	.remove	= omap_dma_remove,
 	.driver = {
 		.name = "omap-dma-engine",
-		.of_match_table = of_match_ptr(omap_dma_match),
+		.of_match_table = omap_dma_match,
 	},
 };
 
Signature · 3 lines
Regards,

Laurent Pinchart
maintainer Applied
#2 lore raw
In reply to Krzysztof Kozlowski
Quoted 6 lines · Krzysztof Kozlowski

The of_device_id is included unconditionally by of.h header and used in the driver as well. Remove of_match_ptr to fix W=1 compile test warning with !CONFIG_OF:

drivers/dma/ti/omap-dma.c:1892:34: warning: 'omap_dma_match' defined but not used [-Wunused-const-variable=]
1892 | static const struct of_device_id omap_dma_match[] = {

Applied, thanks

Signature · 1 line
~Vinod