linux-efi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] efi: sysfb_efi: fix build when EFI is not set
@ 2021-07-27  5:04 Randy Dunlap
  2021-07-27  7:05 ` Ard Biesheuvel
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Randy Dunlap @ 2021-07-27  5:04 UTC (permalink / raw)
  To: linux-kernel
  Cc: Randy Dunlap, Ard Biesheuvel, linux-efi, dri-devel,
	Javier Martinez Canillas, Thomas Zimmermann, Mark Brown,
	linux-next

When # CONFIG_EFI is not set, there are 2 definitions of
sysfb_apply_efi_quirks(). The stub from sysfb.h should be used
and the __init function from sysfb_efi.c should not be used.

../drivers/firmware/efi/sysfb_efi.c:337:13: error: redefinition of ‘sysfb_apply_efi_quirks’
 __init void sysfb_apply_efi_quirks(struct platform_device *pd)
             ^~~~~~~~~~~~~~~~~~~~~~
In file included from ../drivers/firmware/efi/sysfb_efi.c:26:0:
../include/linux/sysfb.h:65:20: note: previous definition of ‘sysfb_apply_efi_quirks’ was here
 static inline void sysfb_apply_efi_quirks(struct platform_device *pd)
                    ^~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: linux-efi@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
Cc: Javier Martinez Canillas <javierm@redhat.com>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Mark Brown <broonie@kernel.org>
Cc: linux-next@vger.kernel.org
---
 drivers/firmware/efi/sysfb_efi.c |    2 ++
 1 file changed, 2 insertions(+)

--- linext-20210726.orig/drivers/firmware/efi/sysfb_efi.c
+++ linext-20210726/drivers/firmware/efi/sysfb_efi.c
@@ -332,6 +332,7 @@ static const struct fwnode_operations ef
 	.add_links = efifb_add_links,
 };
 
+#ifdef CONFIG_EFI
 static struct fwnode_handle efifb_fwnode;
 
 __init void sysfb_apply_efi_quirks(struct platform_device *pd)
@@ -354,3 +355,4 @@ __init void sysfb_apply_efi_quirks(struc
 		pd->dev.fwnode = &efifb_fwnode;
 	}
 }
+#endif

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-07-28  8:50 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-27  5:04 [PATCH] efi: sysfb_efi: fix build when EFI is not set Randy Dunlap
2021-07-27  7:05 ` Ard Biesheuvel
2021-07-27  7:54 ` Javier Martinez Canillas
2021-07-27  9:15 ` Thomas Zimmermann
2021-07-27  9:54   ` Daniel Vetter
2021-07-27 16:25 ` kernel test robot
2021-07-28  8:39 ` Geert Uytterhoeven
2021-07-28  8:50   ` Ard Biesheuvel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).