Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

dmaengine: dw: dmamux: Fix build without CONFIG_OF

When built without OF support, of_match_node() expands to NULL, which
produces the following output:
>> drivers/dma/dw/rzn1-dmamux.c:105:34: warning: unused variable 'rzn1_dmac_match' [-Wunused-const-variable]
static const struct of_device_id rzn1_dmac_match[] = {

One way to silence the warning is to enclose the structure definition
with an #ifdef CONFIG_OF/#endif block.

Fixes: 134d9c52fca2 ("dmaengine: dw: dmamux: Introduce RZN1 DMA router support")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20220609141455.300879-2-miquel.raynal@bootlin.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Miquel Raynal and committed by
Vinod Koul
7811f2e7 2717d338

+2
+2
drivers/dma/dw/rzn1-dmamux.c
··· 102 102 return ERR_PTR(ret); 103 103 } 104 104 105 + #ifdef CONFIG_OF 105 106 static const struct of_device_id rzn1_dmac_match[] = { 106 107 { .compatible = "renesas,rzn1-dma" }, 107 108 {} 108 109 }; 110 + #endif 109 111 110 112 static int rzn1_dmamux_probe(struct platform_device *pdev) 111 113 {