diff options
author | Christof Schmitt <christof.schmitt@de.ibm.com> | 2008-05-19 12:17:47 +0200 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-06-05 09:27:15 -0500 |
commit | aa0fec62391cd429385e7f3f9fc4a1fb8e2d1218 (patch) | |
tree | 24cec104ec5bcea8fe4d12e1b158f6f0a105a080 /drivers/s390/scsi/zfcp_erp.c | |
parent | 7337891f381f856a63595392d7e79f2580912bf7 (diff) | |
download | op-kernel-dev-aa0fec62391cd429385e7f3f9fc4a1fb8e2d1218.zip op-kernel-dev-aa0fec62391cd429385e7f3f9fc4a1fb8e2d1218.tar.gz |
[SCSI] zfcp: Fix sparse warning by providing new entry in dbf
drivers/s390/scsi/zfcp_dbf.c:692:2: warning: context imbalance in
'zfcp_rec_dbf_event_thread' - different lock contexts for basic block
Replace the parameter indicating if the lock is held with a new entry
function that only acquires the lock. This makes the lock handling
more visible and removes the sparse warning.
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: Martin Peschke <mp3@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/s390/scsi/zfcp_erp.c')
-rw-r--r-- | drivers/s390/scsi/zfcp_erp.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/s390/scsi/zfcp_erp.c b/drivers/s390/scsi/zfcp_erp.c index 55a4fdc..d05b370 100644 --- a/drivers/s390/scsi/zfcp_erp.c +++ b/drivers/s390/scsi/zfcp_erp.c @@ -783,7 +783,7 @@ zfcp_erp_action_ready(struct zfcp_erp_action *erp_action) zfcp_erp_action_to_ready(erp_action); up(&adapter->erp_ready_sem); - zfcp_rec_dbf_event_thread(2, adapter, 0); + zfcp_rec_dbf_event_thread(2, adapter); } /* @@ -995,7 +995,7 @@ zfcp_erp_thread_kill(struct zfcp_adapter *adapter) atomic_set_mask(ZFCP_STATUS_ADAPTER_ERP_THREAD_KILL, &adapter->status); up(&adapter->erp_ready_sem); - zfcp_rec_dbf_event_thread(2, adapter, 1); + zfcp_rec_dbf_event_thread_lock(2, adapter); wait_event(adapter->erp_thread_wqh, !atomic_test_mask(ZFCP_STATUS_ADAPTER_ERP_THREAD_UP, @@ -1050,9 +1050,9 @@ zfcp_erp_thread(void *data) * no action in 'ready' queue to be processed and * thread is not to be killed */ - zfcp_rec_dbf_event_thread(4, adapter, 1); + zfcp_rec_dbf_event_thread_lock(4, adapter); down_interruptible(&adapter->erp_ready_sem); - zfcp_rec_dbf_event_thread(5, adapter, 1); + zfcp_rec_dbf_event_thread_lock(5, adapter); } atomic_clear_mask(ZFCP_STATUS_ADAPTER_ERP_THREAD_UP, &adapter->status); @@ -2062,9 +2062,9 @@ zfcp_erp_adapter_strategy_open_fsf_xconfig(struct zfcp_erp_action *erp_action) * _must_ be the one belonging to the 'exchange config * data' request. */ - zfcp_rec_dbf_event_thread(6, adapter, 1); + zfcp_rec_dbf_event_thread_lock(6, adapter); down(&adapter->erp_ready_sem); - zfcp_rec_dbf_event_thread(7, adapter, 1); + zfcp_rec_dbf_event_thread_lock(7, adapter); if (erp_action->status & ZFCP_STATUS_ERP_TIMEDOUT) { ZFCP_LOG_INFO("error: exchange of configuration data " "for adapter %s timed out\n", @@ -2118,9 +2118,9 @@ zfcp_erp_adapter_strategy_open_fsf_xport(struct zfcp_erp_action *erp_action) } ret = ZFCP_ERP_SUCCEEDED; - zfcp_rec_dbf_event_thread(8, adapter, 1); + zfcp_rec_dbf_event_thread_lock(8, adapter); down(&adapter->erp_ready_sem); - zfcp_rec_dbf_event_thread(9, adapter, 1); + zfcp_rec_dbf_event_thread_lock(9, adapter); if (erp_action->status & ZFCP_STATUS_ERP_TIMEDOUT) { ZFCP_LOG_INFO("error: exchange port data timed out (adapter " "%s)\n", zfcp_get_busid_by_adapter(adapter)); @@ -2876,7 +2876,7 @@ static int zfcp_erp_action_enqueue(int want, struct zfcp_adapter *adapter, /* finally put it into 'ready' queue and kick erp thread */ list_add_tail(&erp_action->list, &adapter->erp_ready_head); up(&adapter->erp_ready_sem); - zfcp_rec_dbf_event_thread(1, adapter, 0); + zfcp_rec_dbf_event_thread(1, adapter); retval = 0; out: zfcp_rec_dbf_event_trigger(id, ref, want, need, erp_action, |