public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andreas Ruprecht <andreas.ruprecht@fau.de>
To: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: Stefan Hengelein <stefan.hengelein@fau.de>
Subject: [PATCH] firmware: iSCSI: Remove unneeded #ifdef and associated dead code
Date: Tue, 07 Apr 2015 18:10:27 +0200	[thread overview]
Message-ID: <55240173.2080305@fau.de> (raw)
In-Reply-To: <1428421339-19722-1-git-send-email-andreas.ruprecht@fau.de>

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@fau.de>
---
This inconsistency was found using the undertaker-checkpatch tool
which is included in the undertaker toolchain.

 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

           reply	other threads:[~2015-04-07 16:18 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <1428421339-19722-1-git-send-email-andreas.ruprecht@fau.de>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55240173.2080305@fau.de \
    --to=andreas.ruprecht@fau.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stefan.hengelein@fau.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox