lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMj1kXG2kcAmmB5aQRv5VBJ8Ov2fcg5waGpD1r=aOR9rV=dSWg@mail.gmail.com>
Date: Wed, 3 Apr 2024 16:03:48 +0300
From: Ard Biesheuvel <ardb@...nel.org>
To: Arnd Bergmann <arnd@...nel.org>
Cc: linux-kernel@...r.kernel.org, 
	Javier Martinez Canillas <javierm@...hat.com>, Randy Dunlap <rdunlap@...radead.org>, 
	Daniel Vetter <daniel.vetter@...ll.ch>, Arnd Bergmann <arnd@...db.de>, 
	Ilias Apalodimas <ilias.apalodimas@...aro.org>, 
	"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>, Tom Lendacky <thomas.lendacky@....com>, 
	"Borislav Petkov (AMD)" <bp@...en8.de>, Masahisa Kojima <masahisa.kojima@...aro.org>, 
	"Rafael J. Wysocki" <rafael@...nel.org>, Rob Herring <robh@...nel.org>, 
	Saravana Kannan <saravanak@...gle.com>, Greg Kroah-Hartman <gregkh@...uxfoundation.org>, 
	linux-efi@...r.kernel.org
Subject: Re: [PATCH 10/34] efi: sysfb: don't build when EFI is disabled

On Wed, 3 Apr 2024 at 11:09, Arnd Bergmann <arnd@...nel.org> wrote:
>
> From: Arnd Bergmann <arnd@...db.de>
>
> With 'make W=1', there is a warning when EFI is turned off but sysfb_efi
> still gets built:
>
> drivers/firmware/efi/sysfb_efi.c:188:35: error: unused variable 'efifb_dmi_system_table' [-Werror,-Wunused-const-variable]
> static const struct dmi_system_id efifb_dmi_system_table[] __initconst = {
>                                   ^
> drivers/firmware/efi/sysfb_efi.c:238:35: error: unused variable 'efifb_dmi_swap_width_height' [-Werror,-Wunused-const-variable]
> static const struct dmi_system_id efifb_dmi_swap_width_height[] __initconst = {
>                                   ^
> drivers/firmware/efi/sysfb_efi.c:297:28: error: unused function 'find_pci_overlap_node' [-Werror,-Wunused-function]
> static struct device_node *find_pci_overlap_node(void)
>
> There was an earlier patch to address the duplicate function definitions, but
> that missed how we should not be building this file in the first place.
>
> Fixes: 15d27b15de96 ("efi: sysfb_efi: fix build when EFI is not set")
> Signed-off-by: Arnd Bergmann <arnd@...db.de>

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

or I can take it via the EFI tree if you prefer.


> ---
>  drivers/firmware/efi/Makefile    | 3 ++-
>  drivers/firmware/efi/sysfb_efi.c | 2 --
>  2 files changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/firmware/efi/Makefile b/drivers/firmware/efi/Makefile
> index a2d0009560d0..3baf80d8cf81 100644
> --- a/drivers/firmware/efi/Makefile
> +++ b/drivers/firmware/efi/Makefile
> @@ -30,7 +30,8 @@ obj-$(CONFIG_EFI_RCI2_TABLE)          += rci2-table.o
>  obj-$(CONFIG_EFI_EMBEDDED_FIRMWARE)    += embedded-firmware.o
>  obj-$(CONFIG_LOAD_UEFI_KEYS)           += mokvar-table.o
>
> -obj-$(CONFIG_SYSFB)                    += sysfb_efi.o
> +sysfb-$(CONFIG_SYSFB)                  += sysfb_efi.o
> +obj-$(CONFIG_EFI)                      += $(sysfb-y)
>
>  arm-obj-$(CONFIG_EFI)                  := efi-init.o arm-runtime.o
>  obj-$(CONFIG_ARM)                      += $(arm-obj-y)
> diff --git a/drivers/firmware/efi/sysfb_efi.c b/drivers/firmware/efi/sysfb_efi.c
> index cc807ed35aed..a8c982475f6b 100644
> --- a/drivers/firmware/efi/sysfb_efi.c
> +++ b/drivers/firmware/efi/sysfb_efi.c
> @@ -346,7 +346,6 @@ static const struct fwnode_operations efifb_fwnode_ops = {
>         .add_links = efifb_add_links,
>  };
>
> -#ifdef CONFIG_EFI
>  static struct fwnode_handle efifb_fwnode;
>
>  __init void sysfb_apply_efi_quirks(void)
> @@ -372,4 +371,3 @@ __init void sysfb_set_efifb_fwnode(struct platform_device *pd)
>                 pd->dev.fwnode = &efifb_fwnode;
>         }
>  }
> -#endif
> --
> 2.39.2
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ