Re: [PATCH] efi: sysfb_efi: fix build when EFI is not set

Ard Biesheuvel
2021-07-27T07:06:19Z

On Tue, 27 Jul 2021 at 07:05, Randy Dunlap <rdunlap@infradead.org> wrote:
>
> 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

Acked-by: Ard Biesheuvel <ardb@kernel.org>

> ---
> drivers/firmware/efi/sysfb_efi.c | 2 ++
> 1 file changed, 2 insertions(+)