[PATCH] Revert duplicate "dock: bay: Don't call acpi_walk_namespace() when ACPI is disabled" commit (was: Please pull ACPI updates)

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Linus Torvalds <torvalds@...>
Cc: Andi Kleen <andi@...>, Jesse Barnes <jbarnes@...>, Rafael J. Wysocki <rjw@...>, Linux Kernel Mailing List <linux-kernel@...>, <linux-acpi@...>, Ingo Molnar <mingo@...>
Date: Thursday, July 17, 2008 - 7:11 pm

On Thu, 17 Jul 2008, Linus Torvalds wrote:

It's not only about destroying work and history, it can be worse than that.

For example look at commits:

816c2eda3ce8fa7eb62f22e01e2ec7a3f7d677c0 (merged between 2.6.26-rc8 and -rc9)
and
cc7e51666d82aedfd6b9a033ca1a10d71c21f1ca (merged now)

The export to quilt and the lazy default fuzz setting of quilt added
aside of Andi's Signed-off-by the following gem:

commit cc7e51666d82aedfd6b9a033ca1a10d71c21f1ca
Author: Len Brown <len.brown@intel.com>
Date:   Tue Jun 24 22:57:12 2008 -0400

    dock: bay: Don't call acpi_walk_namespace() when ACPI is disabled.
    
    Signed-off-by: Len Brown <len.brown@intel.com>
    Signed-off-by: Andi Kleen <ak@linux.intel.com>

diff --git a/drivers/acpi/bay.c b/drivers/acpi/bay.c
index 61b6c5b..e6caf5d 100644
--- a/drivers/acpi/bay.c
+++ b/drivers/acpi/bay.c
@@ -380,6 +380,9 @@ static int __init bay_init(void)
 	if (acpi_disabled)
 		return -ENODEV;
 
+	if (acpi_disabled)
+		return -ENODEV;
+
 	/* look for dockable drive bays */
 	acpi_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT,
 		ACPI_UINT32_MAX, find_bay, &bays, NULL);
diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c
index bb7c51f..1e872e7 100644
--- a/drivers/acpi/dock.c
+++ b/drivers/acpi/dock.c
@@ -920,6 +920,9 @@ static int __init dock_init(void)
 	if (acpi_disabled)
 		return 0;
 
+	if (acpi_disabled)
+		return 0;
+
 	/* look for a dock station */
 	acpi_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT,
 			    ACPI_UINT32_MAX, find_dock, &num, NULL);

[ Note the code duplication in both files ]

I stumbled accross this incidentally while looking at the recent merge
commits.

While this one looks odd but harmless, probably a full audit of all
the affected commits should be done.

Please revert the one I happened to notice. Patch below.

Thanks,

	tglx

----------->
Subject: APCI: revert duplicated patch
From: Thomas Gleixner <tglx@linutronix.de>

commit 816c2eda3ce8fa7eb62f22e01e2ec7a3f7d677c0
    dock: bay: Don't call acpi_walk_namespace() when ACPI is disabled.  

was merged between 2.6.26-rc8 and -rc9)

Due to rebasing the ACPI tree via quilt the same patch got applied
again via 

commit cc7e51666d82aedfd6b9a033ca1a10d71c21f1ca
    dock: bay: Don't call acpi_walk_namespace() when ACPI is disabled.  

Revert it, as it is obviously bogus.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

---
diff --git a/drivers/acpi/bay.c b/drivers/acpi/bay.c
index e6caf5d..61b6c5b 100644
--- a/drivers/acpi/bay.c
+++ b/drivers/acpi/bay.c
@@ -380,9 +380,6 @@ static int __init bay_init(void)
 	if (acpi_disabled)
 		return -ENODEV;
 
-	if (acpi_disabled)
-		return -ENODEV;
-
 	/* look for dockable drive bays */
 	acpi_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT,
 		ACPI_UINT32_MAX, find_bay, &bays, NULL);
diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c
index 1e872e7..bb7c51f 100644
--- a/drivers/acpi/dock.c
+++ b/drivers/acpi/dock.c
@@ -920,9 +920,6 @@ static int __init dock_init(void)
 	if (acpi_disabled)
 		return 0;
 
-	if (acpi_disabled)
-		return 0;
-
 	/* look for a dock station */
 	acpi_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT,
 			    ACPI_UINT32_MAX, find_dock, &num, NULL);
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Please pull ACPI updates, Andi Kleen, (Wed Jul 16, 5:45 pm)
Re: Please pull ACPI updates, Rafael J. Wysocki, (Wed Jul 16, 6:11 pm)
Re: Please pull ACPI updates, Jesse Barnes, (Wed Jul 16, 7:33 pm)
Re: Please pull ACPI updates, Andi Kleen, (Thu Jul 17, 2:47 am)
Re: Please pull ACPI updates, Linus Torvalds, (Thu Jul 17, 11:18 am)
Re: Please pull ACPI updates, Linus Torvalds, (Thu Jul 17, 11:47 am)
Re: Please pull ACPI updates, Andi Kleen, (Thu Jul 17, 12:23 pm)
Re: Please pull ACPI updates, Ray Lee, (Thu Jul 17, 3:11 pm)
Re: Please pull ACPI updates, Andi Kleen, (Thu Jul 17, 3:49 pm)
Re: Please pull ACPI updates, Ray Lee, (Thu Jul 17, 4:11 pm)
Re: Please pull ACPI updates, Andi Kleen, (Thu Jul 17, 4:29 pm)
Re: Please pull ACPI updates, , (Fri Jul 18, 2:39 am)
Re: Please pull ACPI updates, Linus Torvalds, (Thu Jul 17, 4:01 pm)
Re: Please pull ACPI updates, Linus Torvalds, (Thu Jul 17, 4:16 pm)
Re: Please pull ACPI updates, Andi Kleen, (Thu Jul 17, 4:34 pm)
Re: Please pull ACPI updates, Linus Torvalds, (Thu Jul 17, 4:28 pm)
Re: Please pull ACPI updates, Olivier Galibert, (Fri Jul 18, 9:25 am)
Re: Please pull ACPI updates, Ray Lee, (Fri Jul 18, 11:57 am)
Re: Please pull ACPI updates, Andi Kleen, (Thu Jul 17, 4:14 pm)
Re: Please pull ACPI updates, Linus Torvalds, (Thu Jul 17, 12:02 pm)
Re: Please pull ACPI updates, Linus Torvalds, (Wed Jul 16, 7:45 pm)
Re: Please pull ACPI updates, Andi Kleen, (Thu Jul 17, 2:40 am)
Re: Please pull ACPI updates, Linus Torvalds, (Thu Jul 17, 11:03 am)
[PATCH] Revert duplicate "dock: bay: Don't call acpi_walk_na..., Thomas Gleixner, (Thu Jul 17, 7:11 pm)
Re: Please pull ACPI updates, Len Brown, (Thu Jul 17, 2:49 pm)
Re: Please pull ACPI updates, J. Bruce Fields, (Thu Jul 17, 5:15 pm)
Re: Please pull ACPI updates, Linus Torvalds, (Thu Jul 17, 3:12 pm)
Re: Please pull ACPI updates, Linus Torvalds, (Thu Jul 17, 3:16 pm)
Re: Please pull ACPI updates, Harvey Harrison, (Thu Jul 17, 3:12 pm)
Re: Please pull ACPI updates, Andi Kleen, (Thu Jul 17, 3:50 pm)
Re: Please pull ACPI updates, Jesse Barnes, (Wed Jul 16, 7:51 pm)
Re: Please pull ACPI updates, Linus Torvalds, (Wed Jul 16, 8:32 pm)
Re: Please pull ACPI updates, Andi Kleen, (Thu Jul 17, 2:45 am)
Re: Please pull ACPI updates, Linus Torvalds, (Thu Jul 17, 11:06 am)
Re: Please pull ACPI updates, Linus Torvalds, (Wed Jul 16, 8:53 pm)
Re: Please pull ACPI updates, Jesse Barnes, (Wed Jul 16, 10:26 pm)
Re: Please pull ACPI updates, Linus Torvalds, (Wed Jul 16, 10:56 pm)