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

dmaengine: ti: drop of_match_ptr and mark of_device_id table as maybe unused

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>
Link: https://lore.kernel.org/r/20201120162303.482126-6-krzk@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Krzysztof Kozlowski and committed by
Vinod Koul
5d051f37 25d39b59

+3 -3
+3 -3
drivers/dma/ti/dma-crossbar.c
··· 122 122 return map; 123 123 } 124 124 125 - static const struct of_device_id ti_am335x_master_match[] = { 125 + static const struct of_device_id ti_am335x_master_match[] __maybe_unused = { 126 126 { .compatible = "ti,edma3-tpcc", }, 127 127 {}, 128 128 }; ··· 292 292 [TI_XBAR_SDMA_OFFSET] = 1, 293 293 }; 294 294 295 - static const struct of_device_id ti_dra7_master_match[] = { 295 + static const struct of_device_id ti_dra7_master_match[] __maybe_unused = { 296 296 { 297 297 .compatible = "ti,omap4430-sdma", 298 298 .data = &ti_dma_offset[TI_XBAR_SDMA_OFFSET], ··· 460 460 static struct platform_driver ti_dma_xbar_driver = { 461 461 .driver = { 462 462 .name = "ti-dma-crossbar", 463 - .of_match_table = of_match_ptr(ti_dma_xbar_match), 463 + .of_match_table = ti_dma_xbar_match, 464 464 }, 465 465 .probe = ti_dma_xbar_probe, 466 466 };