lkml.org 
[lkml]   [2004]   [Nov]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: [PATCH] PCI fixes for 2.6.10-rc1
Date
From
ChangeSet 1.2026.66.14, 2004/11/05 15:05:43-08:00, tglx@linutronix.de

[PATCH] Lock initializer unifying Batch 2 (PCI)

To make spinlock/rwlock initialization consistent all over the kernel,
this patch converts explicit lock-initializers into spin_lock_init() and
rwlock_init() calls.

Currently, spinlocks and rwlocks are initialized in two different ways:

lock = SPIN_LOCK_UNLOCKED
spin_lock_init(&lock)

rwlock = RW_LOCK_UNLOCKED
rwlock_init(&rwlock)

this patch converts all explicit lock initializations to
spin_lock_init() or rwlock_init(). (Besides consistency this also helps
automatic lock validators and debugging code.)

The conversion was done with a script, it was verified manually and it
was reviewed, compiled and tested as far as possible on x86, ARM, PPC.

There is no runtime overhead or actual code change resulting out of this
patch, because spin_lock_init() and rwlock_init() are macros and are
thus equivalent to the explicit initialization method.

That's the second batch of the unifying patches.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>


drivers/pci/hotplug/acpiphp_glue.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)


diff -Nru a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c
--- a/drivers/pci/hotplug/acpiphp_glue.c 2004-11-12 15:13:13 -08:00
+++ b/drivers/pci/hotplug/acpiphp_glue.c 2004-11-12 15:13:13 -08:00
@@ -389,7 +389,7 @@

bridge->pci_bus = pci_find_bus(seg, bus);

- bridge->res_lock = SPIN_LOCK_UNLOCKED;
+ spin_lock_init(&bridge->res_lock);

/* to be overridden when we decode _CRS */
bridge->sub = bridge->bus;
@@ -457,7 +457,7 @@
return;
}

- bridge->res_lock = SPIN_LOCK_UNLOCKED;
+ spin_lock_init(&bridge->res_lock);

bridge->bus = bridge->pci_bus->number;
bridge->sub = bridge->pci_bus->subordinate;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:08    [W:0.409 / U:0.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site