From 8e9157c832b0dd0a8916278355cf5b15cd19c3c9 Mon Sep 17 00:00:00 2001 From: Vikas Chaudhary Date: Wed, 22 Aug 2012 07:45:24 -0400 Subject: [PATCH] [SCSI] qla4xxx: Fix lockdep warning in qla4xxx_post_work() Fix following lockdep warning:- INFO: trying to register non-static key. the code is fine but needs lockdep annotation. turning off the locking correctness validator. Pid: 298, comm: modprobe Not tainted 3.6.0-rc1+ #13 Call Trace: [] register_lock_class+0x186/0x360 [] ? __dev_printk+0x139/0x280 [] __lock_acquire+0x6a/0x450 [] lock_acquire+0x84/0xf0 [] ? qla4xxx_post_work+0x20/0x60 [qla4xxx] [] _raw_spin_lock_irqsave+0x4b/0x60 [] ? qla4xxx_post_work+0x20/0x60 [qla4xxx] [] qla4xxx_post_work+0x20/0x60 [qla4xxx] [] qla4xxx_post_aen_work+0x49/0x60 [qla4xxx] [] qla4xxx_isr_decode_mailbox+0x3f2/0x780 [qla4xxx] [] qla4_83xx_interrupt_service_routine+0x33/0x50 [qla4xxx] [] qla4_83xx_process_mbox_intr+0x29/0x40 [qla4xxx] [] qla4xxx_mailbox_command+0x361/0x5d0 [qla4xxx] [] ? mutex_unlock+0x8/0x10 [] qla4xxx_get_ifcb+0x66/0xb0 [qla4xxx] [] qla4xxx_update_local_ifcb+0x27/0x100 [qla4xxx] [] qla4xxx_initialize_fw_cb+0x2ff/0x3b0 [qla4xxx] [] ? dma_generic_free_coherent+0x30/0x30 [] qla4xxx_init_firmware+0x40/0xf0 [qla4xxx] [] qla4xxx_initialize_adapter+0x96/0x120 [qla4xxx] [] qla4xxx_probe_adapter+0x378/0x855 [qla4xxx] [] ? trace_hardirqs_on_caller+0xf4/0x180 [] ? trace_hardirqs_on+0xb/0x10 [] ? pm_runtime_enable+0x43/0x70 [] local_pci_probe+0x42/0xb0 [] pci_device_probe+0x60/0x80 [] really_probe+0x56/0x2e0 [] ? _raw_spin_unlock_irq+0x22/0x30 [] ? pm_runtime_barrier+0x52/0xb0 [] driver_probe_device+0x37/0x90 [] ? mutex_lock_nested+0x31/0x40 [] __driver_attach+0x81/0x90 [] bus_for_each_dev+0x48/0x70 [] driver_attach+0x19/0x20 [] ? driver_probe_device+0x90/0x90 [] bus_add_driver+0x18f/0x280 [] ? pci_dev_put+0x20/0x20 [] ? pci_dev_put+0x20/0x20 [] driver_register+0x65/0x120 [] ? __raw_spin_lock_init+0x32/0x60 [] __pci_register_driver+0x54/0xc0 [] qla4xxx_module_init+0x9e/0xcd [qla4xxx] [] do_one_initcall+0x2f/0x170 [] ? 0xf98e7fff [] sys_init_module+0x75/0x1c0 [] ? trace_hardirqs_on_caller+0xf4/0x180 [] ? trace_hardirqs_on_thunk+0xc/0x10 [] sysenter_do_call+0x12/0x38 Signed-off-by: Vikas Chaudhary Reviewed-by: Mike Christie Signed-off-by: James Bottomley --- drivers/scsi/qla4xxx/ql4_os.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c index 9c3442db7ee7..fa1a3594edd5 100644 --- a/drivers/scsi/qla4xxx/ql4_os.c +++ b/drivers/scsi/qla4xxx/ql4_os.c @@ -5104,6 +5104,7 @@ static int __devinit qla4xxx_probe_adapter(struct pci_dev *pdev, init_completion(&ha->disable_acb_comp); spin_lock_init(&ha->hardware_lock); + spin_lock_init(&ha->work_lock); /* Initialize work list */ INIT_LIST_HEAD(&ha->work_list); -- 2.39.5