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

rtc: rx6110: fix warning with !OF

rx6110_spi_of_match is not used when !OF, leading to a warning:

>> drivers/rtc/rtc-rx6110.c:384:34: warning: 'rx6110_spi_of_match' defined but not used [-Wunused-const-variable=]
384 | static const struct of_device_id rx6110_spi_of_match[] = {
| ^~~~~~~~~~~~~~~~~~~

Reported-by: kernel test robot <lkp@intel.com>
Link: https://lore.kernel.org/r/20221211215756.54002-1-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>

+1 -1
+1 -1
drivers/rtc/rtc-rx6110.c
··· 376 376 }; 377 377 MODULE_DEVICE_TABLE(spi, rx6110_spi_id); 378 378 379 - static const struct of_device_id rx6110_spi_of_match[] = { 379 + static const __maybe_unused struct of_device_id rx6110_spi_of_match[] = { 380 380 { .compatible = "epson,rx6110" }, 381 381 { }, 382 382 };