]> git.baikalelectronics.ru Git - kernel.git/commit
dmaengine: dw: dmamux: Fix build without CONFIG_OF
authorMiquel Raynal <miquel.raynal@bootlin.com>
Thu, 9 Jun 2022 14:14:55 +0000 (16:14 +0200)
committerVinod Koul <vkoul@kernel.org>
Fri, 10 Jun 2022 12:21:21 +0000 (17:51 +0530)
commitdc8c0d998777241ba0f91707e2923ddc50695f7b
treeee196dec2bf808487b602407fdb7599407247f48
parent85f9d6f2cba2b4b583598e0126747c44ba0e391f
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: 5b2843f3ddc0 ("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>
drivers/dma/dw/rzn1-dmamux.c