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-next>] [day] [month] [year] [list]
Date:	Sun, 12 Apr 2015 14:19:04 +0200
From:	Andreas Ruprecht <andreas.ruprecht@....de>
To:	Peter Jones <pjones@...hat.com>
Cc:	Lv Zheng <lv.zheng@...el.com>,
	Konrad Rzeszutek Wilk <konrad@...nel.org>,
	linux-kernel@...r.kernel.org,
	Andreas Ruprecht <andreas.ruprecht@....de>
Subject: [PATCH RESEND] firmware: iSCSI: Remove unneeded #ifdef and associated dead code

In commit 9d24622ced32 ("ACPI / IBFT: Fix incorrect <acpi/acpi.h>
inclusion in iSCSI boot firmware module"), the dependencies for
CONFIG_ISCSI_IBFT_FIND were changed to also include CONFIG_ACPI.

Inside drivers/firmware/iscsi_ibft.c, there is an "#ifdef CONFIG_ACPI"
block, while the whole file is only compiled with CONFIG_ISCSI_IBFT
enabled. As CONFIG_ISCSI_IBFT depends on CONFIG_ISCSI_IBFT_FIND
(which in turn depends on CONFIG_ACPI), CONFIG_ACPI will always be
enabled when we compile the file, hence the #ifdef is unnecessary and
the (empty) function inside the #else block can never be compiled and
they can both be removed.

Signed-off-by: Andreas Ruprecht <andreas.ruprecht@....de>
---
 drivers/firmware/iscsi_ibft.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/drivers/firmware/iscsi_ibft.c b/drivers/firmware/iscsi_ibft.c
index 071c2c9..60c937f 100644
--- a/drivers/firmware/iscsi_ibft.c
+++ b/drivers/firmware/iscsi_ibft.c
@@ -746,7 +746,6 @@ static void __exit ibft_exit(void)
 	ibft_cleanup();
 }
 
-#ifdef CONFIG_ACPI
 static const struct {
 	char *sign;
 } ibft_signs[] = {
@@ -772,11 +771,6 @@ static void __init acpi_find_ibft_region(void)
 		ibft_addr = (struct acpi_table_ibft *)table;
 	}
 }
-#else
-static void __init acpi_find_ibft_region(void)
-{
-}
-#endif
 
 /*
  * ibft_init() - creates sysfs tree entries for the iBFT data.
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ