Randy Dunlap <rdunlap@xxxxxxxxxxxxx> writes: Hello Randy, > A build with W=1 fails because there are code and data that are not > needed or used when CONFIG_EFI is not set. Move the "#ifdef CONFIG_EFI" > block to earlier in the source file so that the unused code/data are > not built. > > drivers/firmware/efi/sysfb_efi.c:345:39: warning: ‘efifb_fwnode_ops’ defined but not used [-Wunused-const-variable=] > 345 | static const struct fwnode_operations efifb_fwnode_ops = { > | ^~~~~~~~~~~~~~~~ > drivers/firmware/efi/sysfb_efi.c:238:35: warning: ‘efifb_dmi_swap_width_height’ defined but not used [-Wunused-const-variable=] > 238 | static const struct dmi_system_id efifb_dmi_swap_width_height[] __initconst = { > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ > drivers/firmware/efi/sysfb_efi.c:188:35: warning: ‘efifb_dmi_system_table’ defined but not used [-Wunused-const-variable=] > 188 | static const struct dmi_system_id efifb_dmi_system_table[] __initconst = { > | ^~~~~~~~~~~~~~~~~~~~~~ > > Fixes: 15d27b15de96 ("efi: sysfb_efi: fix build when EFI is not set") > Signed-off-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx> > Reported-by: kernel test robot <lkp@xxxxxxxxx> > Closes: https://lore.kernel.org/oe-kbuild-all/202501071933.20nlmJJt-lkp@xxxxxxxxx/ > Cc: David Rheinsberg <david@xxxxxxxxxxxx> > Cc: Hans de Goede <hdegoede@xxxxxxxxxx> > Cc: Javier Martinez Canillas <javierm@xxxxxxxxxx> > Cc: Peter Jones <pjones@xxxxxxxxxx> > Cc: Simona Vetter <simona@xxxxxxxx> > Cc: linux-fbdev@xxxxxxxxxxxxxxx > Cc: Ard Biesheuvel <ardb@xxxxxxxxxx> > Cc: linux-efi@xxxxxxxxxxxxxxx > --- > drivers/firmware/efi/sysfb_efi.c | 2 +- Reviewed-by: Javier Martinez Canillas <javierm@xxxxxxxxxx> -- Best regards, Javier Martinez Canillas Core Platforms Red Hat