On Fri, Jun 18, 2021 at 02:27:29PM +0200, Arnd Bergmann wrote: > On Fri, Jun 18, 2021 at 2:25 PM kernel test robot wrote: > > > > All warnings (new ones prefixed by >>): > > > > >> drivers/fpga/lattice/machxo2-spi.c:377:34: warning: unused variable 'of_match' [-Wunused-const-variable] > > static const struct of_device_id of_match[] = { > > ^ > > 1 warning generated. > > This is almost always the result of an 'of_match_ptr()' that should be > removed, I have not > checked this instance. > > Arnd I think the of_device id is missing a #CONFIG_OF @@ -374,11 +374,13 @@ static int machxo2_spi_probe(struct spi_device *spi) return devm_fpga_mgr_register(dev, mgr); } +#ifdef CONFIG_OF static const struct of_device_id of_match[] = { { .compatible = "lattice,machxo2-slave-spi", }, {} }; MODULE_DEVICE_TABLE(of, of_match); +#endif - Moritz