linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/6] dmaengine: jz4780: drop of_match_ptr from of_device_id table
@ 2020-11-20 16:22 Krzysztof Kozlowski
  2020-11-20 16:22 ` [PATCH 2/6] dmaengine: dw-axi-dmac: " Krzysztof Kozlowski
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Krzysztof Kozlowski @ 2020-11-20 16:22 UTC (permalink / raw)
  To: linux-kernel, Dan Williams, Vinod Koul, dmaengine
  Cc: Krzysztof Kozlowski, Zubair Lutfullah Kakakhel, Paul Cercueil

The driver can match only via the DT table so the table should be always
used and the of_match_ptr does not have any sense (this also allows ACPI
matching via PRP0001, even though it is not relevant here).  This fixes
compile warning (!CONFIG_OF on x86_64):

    drivers/dma/dma-jz4780.c:1031:34: warning:
        ‘jz4780_dma_dt_match’ defined but not used [-Wunused-const-variable=]

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 drivers/dma/dma-jz4780.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/dma/dma-jz4780.c b/drivers/dma/dma-jz4780.c
index a608efaa435f..612d353648cf 100644
--- a/drivers/dma/dma-jz4780.c
+++ b/drivers/dma/dma-jz4780.c
@@ -1044,7 +1044,7 @@ static struct platform_driver jz4780_dma_driver = {
 	.remove		= jz4780_dma_remove,
 	.driver	= {
 		.name	= "jz4780-dma",
-		.of_match_table = of_match_ptr(jz4780_dma_dt_match),
+		.of_match_table = jz4780_dma_dt_match,
 	},
 };
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/6] dmaengine: dw-axi-dmac: drop of_match_ptr from of_device_id table
  2020-11-20 16:22 [PATCH 1/6] dmaengine: jz4780: drop of_match_ptr from of_device_id table Krzysztof Kozlowski
@ 2020-11-20 16:22 ` Krzysztof Kozlowski
  2020-11-20 16:23 ` [PATCH 3/6] dmaengine: mv_xor: " Krzysztof Kozlowski
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Krzysztof Kozlowski @ 2020-11-20 16:22 UTC (permalink / raw)
  To: linux-kernel, Dan Williams, Vinod Koul, dmaengine
  Cc: Krzysztof Kozlowski, Eugeniy Paltsev

The driver can match only via the DT table so the table should be always
used and the of_match_ptr does not have any sense (this also allows ACPI
matching via PRP0001, even though it is not relevant here).  This fixes
compile warning (!CONFIG_OF on x86_64):

    drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:984:34: warning:
        ‘dw_dma_of_id_table’ defined but not used [-Wunused-const-variable=]

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c b/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
index 14c1ac26f866..e164f3295f5d 100644
--- a/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
+++ b/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
@@ -992,7 +992,7 @@ static struct platform_driver dw_driver = {
 	.remove		= dw_remove,
 	.driver = {
 		.name	= KBUILD_MODNAME,
-		.of_match_table = of_match_ptr(dw_dma_of_id_table),
+		.of_match_table = dw_dma_of_id_table,
 		.pm = &dw_axi_dma_pm_ops,
 	},
 };
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 3/6] dmaengine: mv_xor: drop of_match_ptr from of_device_id table
  2020-11-20 16:22 [PATCH 1/6] dmaengine: jz4780: drop of_match_ptr from of_device_id table Krzysztof Kozlowski
  2020-11-20 16:22 ` [PATCH 2/6] dmaengine: dw-axi-dmac: " Krzysztof Kozlowski
@ 2020-11-20 16:23 ` Krzysztof Kozlowski
  2020-11-20 16:23 ` [PATCH 4/6] dmaengine: sf: " Krzysztof Kozlowski
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Krzysztof Kozlowski @ 2020-11-20 16:23 UTC (permalink / raw)
  To: linux-kernel, Dan Williams, Vinod Koul, dmaengine; +Cc: Krzysztof Kozlowski

The driver can match only via the DT table so the table should be always
used and the of_match_ptr does not have any sense (this also allows ACPI
matching via PRP0001, even though it is not relevant here).  This fixes
compile warning (!CONFIG_OF on x86_64):

    drivers/dma/mv_xor.c:1281:34: warning:
        ‘mv_xor_dt_ids’ defined but not used [-Wunused-const-variable=]

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 drivers/dma/mv_xor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/dma/mv_xor.c b/drivers/dma/mv_xor.c
index 00cd1335eeba..23b232b57518 100644
--- a/drivers/dma/mv_xor.c
+++ b/drivers/dma/mv_xor.c
@@ -1455,7 +1455,7 @@ static struct platform_driver mv_xor_driver = {
 	.resume         = mv_xor_resume,
 	.driver		= {
 		.name	        = MV_XOR_NAME,
-		.of_match_table = of_match_ptr(mv_xor_dt_ids),
+		.of_match_table = mv_xor_dt_ids,
 	},
 };
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 4/6] dmaengine: sf: drop of_match_ptr from of_device_id table
  2020-11-20 16:22 [PATCH 1/6] dmaengine: jz4780: drop of_match_ptr from of_device_id table Krzysztof Kozlowski
  2020-11-20 16:22 ` [PATCH 2/6] dmaengine: dw-axi-dmac: " Krzysztof Kozlowski
  2020-11-20 16:23 ` [PATCH 3/6] dmaengine: mv_xor: " Krzysztof Kozlowski
@ 2020-11-20 16:23 ` Krzysztof Kozlowski
  2020-11-20 16:23 ` [PATCH 5/6] dmaengine: stm32: mark of_device_id table as maybe unused Krzysztof Kozlowski
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Krzysztof Kozlowski @ 2020-11-20 16:23 UTC (permalink / raw)
  To: linux-kernel, Dan Williams, Vinod Koul, dmaengine
  Cc: Krzysztof Kozlowski, Green Wan

The driver can match only via the DT table so the table should be always
used and the of_match_ptr does not have any sense (this also allows ACPI
matching via PRP0001, even though it is not relevant here).  This fixes
compile warning (!CONFIG_OF on x86_64):

    drivers/dma/sf-pdma/sf-pdma.c:576:34: warning:
        ‘sf_pdma_dt_ids’ defined but not used [-Wunused-const-variable=]

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 drivers/dma/sf-pdma/sf-pdma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/dma/sf-pdma/sf-pdma.c b/drivers/dma/sf-pdma/sf-pdma.c
index 528deb5d9f31..d5b73a765eb5 100644
--- a/drivers/dma/sf-pdma/sf-pdma.c
+++ b/drivers/dma/sf-pdma/sf-pdma.c
@@ -584,7 +584,7 @@ static struct platform_driver sf_pdma_driver = {
 	.remove		= sf_pdma_remove,
 	.driver		= {
 		.name	= "sf-pdma",
-		.of_match_table = of_match_ptr(sf_pdma_dt_ids),
+		.of_match_table = sf_pdma_dt_ids,
 	},
 };
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 5/6] dmaengine: stm32: mark of_device_id table as maybe unused
  2020-11-20 16:22 [PATCH 1/6] dmaengine: jz4780: drop of_match_ptr from of_device_id table Krzysztof Kozlowski
                   ` (2 preceding siblings ...)
  2020-11-20 16:23 ` [PATCH 4/6] dmaengine: sf: " Krzysztof Kozlowski
@ 2020-11-20 16:23 ` Krzysztof Kozlowski
  2020-11-20 16:23 ` [PATCH 6/6] dmaengine: ti: drop of_match_ptr and " Krzysztof Kozlowski
  2020-11-24 17:32 ` [PATCH 1/6] dmaengine: jz4780: drop of_match_ptr from of_device_id table Vinod Koul
  5 siblings, 0 replies; 7+ messages in thread
From: Krzysztof Kozlowski @ 2020-11-20 16:23 UTC (permalink / raw)
  To: linux-kernel, Dan Williams, Vinod Koul, dmaengine
  Cc: Krzysztof Kozlowski, Maxime Coquelin, Alexandre Torgue,
	linux-stm32, linux-arm-kernel

The driver uses a second of_device_id table in the probe()
function by passing it to of_match_node().  This code will be a no-op
for compile testing (!CONFIG_OF on x86_64):

    drivers/dma/stm32-dmamux.c:171:34: warning:
        ‘stm32_stm32dma_master_match’ defined but not used [-Wunused-const-variable=]

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 drivers/dma/stm32-dmamux.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/dma/stm32-dmamux.c b/drivers/dma/stm32-dmamux.c
index a10ccd964376..ef0d0555103d 100644
--- a/drivers/dma/stm32-dmamux.c
+++ b/drivers/dma/stm32-dmamux.c
@@ -168,7 +168,7 @@ static void *stm32_dmamux_route_allocate(struct of_phandle_args *dma_spec,
 	return ERR_PTR(ret);
 }
 
-static const struct of_device_id stm32_stm32dma_master_match[] = {
+static const struct of_device_id stm32_stm32dma_master_match[] __maybe_unused = {
 	{ .compatible = "st,stm32-dma", },
 	{},
 };
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 6/6] dmaengine: ti: drop of_match_ptr and mark of_device_id table as maybe unused
  2020-11-20 16:22 [PATCH 1/6] dmaengine: jz4780: drop of_match_ptr from of_device_id table Krzysztof Kozlowski
                   ` (3 preceding siblings ...)
  2020-11-20 16:23 ` [PATCH 5/6] dmaengine: stm32: mark of_device_id table as maybe unused Krzysztof Kozlowski
@ 2020-11-20 16:23 ` Krzysztof Kozlowski
  2020-11-24 17:32 ` [PATCH 1/6] dmaengine: jz4780: drop of_match_ptr from of_device_id table Vinod Koul
  5 siblings, 0 replies; 7+ messages in thread
From: Krzysztof Kozlowski @ 2020-11-20 16:23 UTC (permalink / raw)
  To: linux-kernel, Dan Williams, Vinod Koul, dmaengine
  Cc: Krzysztof Kozlowski, chenqiwu, Peter Ujfalusi

The driver can match only via the DT table so the main table should be
always used and the of_match_ptr does not have any sense (this also
allows ACPI matching via PRP0001, even though it is not relevant here).

The secondary match of_device_id tables (passed to of_match_node) should
be marked as maybe unused to fix compile testing (!CONFIG_OF on x86_64)
warnings:

    drivers/dma/ti/dma-crossbar.c:125:34: warning:
        ‘ti_am335x_master_match’ defined but not used [-Wunused-const-variable=]
    drivers/dma/ti/dma-crossbar.c:22:34: warning:
        ‘ti_dma_xbar_match’ defined but not used [-Wunused-const-variable=]

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 drivers/dma/ti/dma-crossbar.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/dma/ti/dma-crossbar.c b/drivers/dma/ti/dma-crossbar.c
index 4ba8fa5d9c36..71d24fc07c00 100644
--- a/drivers/dma/ti/dma-crossbar.c
+++ b/drivers/dma/ti/dma-crossbar.c
@@ -122,7 +122,7 @@ static void *ti_am335x_xbar_route_allocate(struct of_phandle_args *dma_spec,
 	return map;
 }
 
-static const struct of_device_id ti_am335x_master_match[] = {
+static const struct of_device_id ti_am335x_master_match[] __maybe_unused = {
 	{ .compatible = "ti,edma3-tpcc", },
 	{},
 };
@@ -292,7 +292,7 @@ static const u32 ti_dma_offset[] = {
 	[TI_XBAR_SDMA_OFFSET] = 1,
 };
 
-static const struct of_device_id ti_dra7_master_match[] = {
+static const struct of_device_id ti_dra7_master_match[] __maybe_unused = {
 	{
 		.compatible = "ti,omap4430-sdma",
 		.data = &ti_dma_offset[TI_XBAR_SDMA_OFFSET],
@@ -460,7 +460,7 @@ static int ti_dma_xbar_probe(struct platform_device *pdev)
 static struct platform_driver ti_dma_xbar_driver = {
 	.driver = {
 		.name = "ti-dma-crossbar",
-		.of_match_table = of_match_ptr(ti_dma_xbar_match),
+		.of_match_table = ti_dma_xbar_match,
 	},
 	.probe	= ti_dma_xbar_probe,
 };
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/6] dmaengine: jz4780: drop of_match_ptr from of_device_id table
  2020-11-20 16:22 [PATCH 1/6] dmaengine: jz4780: drop of_match_ptr from of_device_id table Krzysztof Kozlowski
                   ` (4 preceding siblings ...)
  2020-11-20 16:23 ` [PATCH 6/6] dmaengine: ti: drop of_match_ptr and " Krzysztof Kozlowski
@ 2020-11-24 17:32 ` Vinod Koul
  5 siblings, 0 replies; 7+ messages in thread
From: Vinod Koul @ 2020-11-24 17:32 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: linux-kernel, Dan Williams, dmaengine, Zubair Lutfullah Kakakhel,
	Paul Cercueil

On 20-11-20, 17:22, Krzysztof Kozlowski wrote:
> The driver can match only via the DT table so the table should be always
> used and the of_match_ptr does not have any sense (this also allows ACPI
> matching via PRP0001, even though it is not relevant here).  This fixes
> compile warning (!CONFIG_OF on x86_64):
> 
>     drivers/dma/dma-jz4780.c:1031:34: warning:
>         ‘jz4780_dma_dt_match’ defined but not used [-Wunused-const-variable=]

Applied all, thanks

-- 
~Vinod

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-11-24 17:33 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-20 16:22 [PATCH 1/6] dmaengine: jz4780: drop of_match_ptr from of_device_id table Krzysztof Kozlowski
2020-11-20 16:22 ` [PATCH 2/6] dmaengine: dw-axi-dmac: " Krzysztof Kozlowski
2020-11-20 16:23 ` [PATCH 3/6] dmaengine: mv_xor: " Krzysztof Kozlowski
2020-11-20 16:23 ` [PATCH 4/6] dmaengine: sf: " Krzysztof Kozlowski
2020-11-20 16:23 ` [PATCH 5/6] dmaengine: stm32: mark of_device_id table as maybe unused Krzysztof Kozlowski
2020-11-20 16:23 ` [PATCH 6/6] dmaengine: ti: drop of_match_ptr and " Krzysztof Kozlowski
2020-11-24 17:32 ` [PATCH 1/6] dmaengine: jz4780: drop of_match_ptr from of_device_id table Vinod Koul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).