From: Christof Schmitt <christof.schmitt@de.ibm.com>
To: James Bottomley <James.Bottomley@suse.de>
Cc: linux-scsi@vger.kernel.org, linux-s390@vger.kernel.org,
schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com,
Christof Schmitt <christof.schmitt@de.ibm.com>
Subject: [patch 11/12] zfcp: Remove duplicated code from zfcp_ccw_set_online
Date: Wed, 08 Sep 2010 14:40:00 +0200 [thread overview]
Message-ID: <20100908124354.230233573@de.ibm.com> (raw)
In-Reply-To: 20100908123949.483410445@de.ibm.com
[-- Attachment #1: 710-zfcp-duplicate-code.diff --]
[-- Type: text/plain, Size: 1194 bytes --]
From: Christof Schmitt <christof.schmitt@de.ibm.com>
The steps for setting the zfcp_adapter online are the same in
zfcp_ccw_set_online and zfcp_ccw_activate. Remove the code duplication
by calling zfcp_ccw_activate from zfcp_ccw_set_online.
Reviewed-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
---
drivers/s390/scsi/zfcp_ccw.c | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff -urpN linux-2.6/drivers/s390/scsi/zfcp_ccw.c linux-2.6-patched/drivers/s390/scsi/zfcp_ccw.c
--- linux-2.6/drivers/s390/scsi/zfcp_ccw.c 2010-08-02 00:11:14.000000000 +0200
+++ linux-2.6-patched/drivers/s390/scsi/zfcp_ccw.c 2010-09-08 08:49:31.000000000 +0200
@@ -164,14 +164,7 @@ static int zfcp_ccw_set_online(struct cc
BUG_ON(!zfcp_reqlist_isempty(adapter->req_list));
adapter->req_no = 0;
- zfcp_erp_modify_adapter_status(adapter, "ccsonl1", NULL,
- ZFCP_STATUS_COMMON_RUNNING, ZFCP_SET);
- zfcp_erp_adapter_reopen(adapter, ZFCP_STATUS_COMMON_ERP_FAILED,
- "ccsonl2", NULL);
- zfcp_erp_wait(adapter);
-
- flush_work(&adapter->scan_work);
-
+ zfcp_ccw_activate(cdev);
zfcp_ccw_adapter_put(adapter);
return 0;
}
next prev parent reply other threads:[~2010-09-08 12:40 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-08 12:39 [patch 00/12] zfcp patches for 2.6.37 merge window Christof Schmitt
2010-09-08 12:39 ` [patch 01/12] zfcp: Reorder registration of initial SCSI device Christof Schmitt
2010-09-08 12:39 ` [patch 02/12] zfcp: Add zfcp private struct as SCSI device driver data Christof Schmitt
2010-09-08 12:39 ` [patch 03/12] zfcp: Move code for managing zfcp_unit devices to new file Christof Schmitt
2010-09-08 12:39 ` [patch 04/12] zfcp: Remove ZFCP_SYSFS_FAILED macro and implement fcp_lun_show without macro Christof Schmitt
2010-09-08 12:39 ` [patch 05/12] zfcp: Allow running unit/LUN shutdown without acquiring reference Christof Schmitt
2010-09-08 12:39 ` [patch 06/12] zfcp: Use SCSI device data zfcp_scsi_dev instead of zfcp_unit Christof Schmitt
2010-09-08 12:39 ` [patch 07/12] zfcp: Allow midlayer to scan for LUNs when running in NPIV mode Christof Schmitt
2010-09-08 12:39 ` [patch 08/12] zfcp: Change spin_lock_bh to spin_lock_irq to fix lockdep warning Christof Schmitt
2010-09-08 12:39 ` [patch 09/12] zfcp: Reorder FCP I/O and task management handler functions Christof Schmitt
2010-09-08 12:39 ` [patch 10/12] zfcp: Move ACL/CFDC code to zfcp_cfdc.c Christof Schmitt
2010-09-08 12:40 ` Christof Schmitt [this message]
2010-09-08 12:40 ` [patch 12/12] zfcp: Replace status modifier functions Christof Schmitt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100908124354.230233573@de.ibm.com \
--to=christof.schmitt@de.ibm.com \
--cc=James.Bottomley@suse.de \
--cc=heiko.carstens@de.ibm.com \
--cc=linux-s390@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=schwidefsky@de.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).