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>] [day] [month] [year] [list]
Message-ID: <20241026070228.3240177-1-zengheng4@huawei.com>
Date: Sat, 26 Oct 2024 15:02:28 +0800
From: Zeng Heng <zengheng4@...wei.com>
To: <tzimmermann@...e.de>, <javierm@...hat.com>,
	<andriy.shevchenko@...el.com>, <ardb@...nel.org>, <bp@...e.de>,
	<simona.vetter@...ll.ch>
CC: <bobo.shaobowang@...wei.com>, <linux-kernel@...r.kernel.org>,
	<linux-efi@...r.kernel.org>
Subject: [PATCH v2] efi: sysfb_efi: Fix unused const variable 'efifb_fwnode_ops'

Fix the following compilation warning:

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 = {

In addition to the above warning messages, a series of unused warnings
because of cascading dependencies were found. The variables and functions
related to warnings are only used after CONFIG_EFI enabled. Therefore,
these warnings are addressed and fixed in this commit.

Fixes: 8633ef82f101 ("drivers/firmware: consolidate EFI framebuffer setup for all arches")
Signed-off-by: Zeng Heng <zengheng4@...wei.com>
---
 drivers/firmware/efi/sysfb_efi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/firmware/efi/sysfb_efi.c b/drivers/firmware/efi/sysfb_efi.c
index cc807ed35aed..0cfc11ecc98b 100644
--- a/drivers/firmware/efi/sysfb_efi.c
+++ b/drivers/firmware/efi/sysfb_efi.c
@@ -82,6 +82,7 @@ void efifb_setup_from_dmi(struct screen_info *si, const char *opt)
 	}
 }
 
+#ifdef CONFIG_EFI
 #define choose_value(dmivalue, fwvalue, field, flags) ({	\
 		typeof(fwvalue) _ret_ = fwvalue;		\
 		if ((flags) & (field))				\
@@ -346,7 +347,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)
-- 
2.25.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ