PCI: Use DEFINE_SPINLOCK() for spinlock
PATCH 1/1 PCI: Use DEFINE_SPINLOCK() for spinlock
From: Guobin Huang <[email protected]>
spinlock can be initialized automatically with DEFINE_SPINLOCK() rather than explicitly calling spin_lock_init().
Reported-by Hulk Robot <[email protected]>
Signed-off-by Guobin Huang <[email protected]>
--- drivers/pci/hotplug/cpqphp_nvram.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/pci/hotplug/cpqphp_nvram.c +1 -4
@@ -80,7 +80,7 @@ static u8 evbuffer[1024];static void __iomem *compaq_int15_entry_point;/* lock for ordering int15_bios_call() */ -static spinlock_t int15_lock; +static DEFINE_SPINLOCK (int15_lock);/* This is a series of function that deals with
@@ -415,9 +415,6 @@ void compaq_nvram_init(void __iomem *rom_start) compaq_int15_entry_point = (rom_start +ROM_INT15_PHY_ADDR -ROM_PHY_ADDR );dbg ("int15 entry = %p\n" , compaq_int15_entry_point); - -/* initialize our int15 lock */ -spin_lock_init (&int15_lock); }
Bjorn Helgaas
AppliedQuoted 7 lines · Huang Guobin
From: Guobin Huang <[email protected]>
spinlock can be initialized automatically with
DEFINE_SPINLOCK()rather than explicitly callingspin_lock_init().Reported-by Hulk Robot <[email protected]>Signed-off-by Guobin Huang <[email protected]>
Applied to pci/hotplug for v5.13, thanks!
Quoted 28 lines
--- drivers/pci/hotplug/cpqphp_nvram.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)drivers/pci/hotplug/cpqphp_nvram.c +1
-4@@ -80,7 +80,7 @@ static u8 evbuffer[1024];static void __iomem *compaq_int15_entry_point;/* lock for ordering int15_bios_call() */ -static spinlock_t int15_lock; +static DEFINE_SPINLOCK (int15_lock);/* This is a series of function that deals with @@ -415,9 +415,6 @@ void compaq_nvram_init(void __iomem *rom_start) compaq_int15_entry_point = (rom_start +ROM_INT15_PHY_ADDR -ROM_PHY_ADDR );dbg ("int15 entry = %p\n" , compaq_int15_entry_point); - -/* initialize our int15 lock */ -spin_lock_init (&int15_lock); }