dmaengine: stm32: mark of_device_id table as maybe unused
authorKrzysztof Kozlowski <krzk@kernel.org>
Fri, 20 Nov 2020 16:23:02 +0000 (17:23 +0100)
committerVinod Koul <vkoul@kernel.org>
Tue, 24 Nov 2020 17:32:20 +0000 (23:02 +0530)
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>
Link: https://lore.kernel.org/r/20201120162303.482126-5-krzk@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/stm32-dmamux.c

index a10ccd964376f53362fb3c1764fceabc13bc404d..ef0d0555103d9f6a7f0cb1a74d53e33869ab142a 100644 (file)
@@ -168,7 +168,7 @@ error_chan_id:
        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", },
        {},
 };