[PATCH 5/6] dmaengine: stm32: mark of_device_id table as maybe unused

Krzysztof Kozlowski krzk at kernel.org
Fri Nov 20 11:23:02 EST 2020


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 at 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




More information about the linux-arm-kernel mailing list