public inbox for linux-s390@vger.kernel.org
 help / color / mirror / Atom feed
From: Christof Schmitt <christof.schmitt@de.ibm.com>
To: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: linux-scsi@vger.kernel.org, linux-s390@vger.kernel.org,
	Christof Schmitt <christof.schmitt@de.ibm.com>,
	Swen Schillig <swen@vnet.ibm.com>
Subject: [patch 04/11] zfcp: Small QDIO cleanups
Date: Wed, 02 Jul 2008 10:56:34 +0200	[thread overview]
Message-ID: <20080702085949.267806000@de.ibm.com> (raw)
In-Reply-To: 20080702085630.473635000@de.ibm.com

[-- Attachment #1: qdio-small-cleanup.diff --]
[-- Type: text/plain, Size: 3335 bytes --]

From: Christof Schmitt <christof.schmitt@de.ibm.com>

QBUFF_PER_PAGE is only used inside the qdio module, so move it to
zfcp_qdio.c

zfcp_qdio_zero_sbals is now only used in the qdio module, so make it
static.

Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
---
---
 drivers/s390/scsi/zfcp_def.h  |    2 --
 drivers/s390/scsi/zfcp_ext.h  |    1 -
 drivers/s390/scsi/zfcp_qdio.c |   31 +++++++++++++------------------
 3 files changed, 13 insertions(+), 21 deletions(-)

--- a/drivers/s390/scsi/zfcp_ext.h	2008-06-27 18:06:59.000000000 +0200
+++ b/drivers/s390/scsi/zfcp_ext.h	2008-06-27 18:08:22.000000000 +0200
@@ -43,7 +43,6 @@ extern void _zfcp_scan_ports_later(struc
 /******************************* S/390 IO ************************************/
 extern int  zfcp_ccw_register(void);
 
-extern void zfcp_qdio_zero_sbals(struct qdio_buffer **, int, int);
 extern int  zfcp_qdio_allocate(struct zfcp_adapter *);
 extern void zfcp_qdio_free(struct zfcp_adapter *);
 extern int  zfcp_qdio_send(struct zfcp_fsf_req *fsf_req);
--- a/drivers/s390/scsi/zfcp_qdio.c	2008-06-27 18:06:59.000000000 +0200
+++ b/drivers/s390/scsi/zfcp_qdio.c	2008-06-27 18:08:22.000000000 +0200
@@ -11,6 +11,7 @@
 /* FIXME(tune): free space should be one max. SBAL chain plus what? */
 #define ZFCP_QDIO_PCI_INTERVAL	(QDIO_MAX_BUFFERS_PER_Q \
 				- (ZFCP_MAX_SBALS_PER_REQ + 4))
+#define QBUFF_PER_PAGE		(PAGE_SIZE / sizeof(struct qdio_buffer))
 
 static int zfcp_qdio_buffers_enqueue(struct qdio_buffer **sbal)
 {
@@ -63,6 +64,16 @@ static void zfcp_qdio_handler_error(stru
 				ZFCP_STATUS_COMMON_ERP_FAILED, id, NULL);
 }
 
+static void zfcp_qdio_zero_sbals(struct qdio_buffer *sbal[], int first, int cnt)
+{
+	int i, sbal_idx;
+
+	for (i = first; i < first + cnt; i++) {
+		sbal_idx = i % QDIO_MAX_BUFFERS_PER_Q;
+		memset(sbal[sbal_idx], 0, sizeof(struct qdio_buffer));
+	}
+}
+
 static void zfcp_qdio_int_req(struct ccw_device *cdev, unsigned int status,
 			      unsigned int qdio_err, unsigned int siga_err,
 			      unsigned int queue_no, int first, int count,
@@ -366,22 +377,6 @@ int zfcp_qdio_send(struct zfcp_fsf_req *
 }
 
 /**
- * zfcp_qdio_zero_sbals - zero all sbals of the specified area and queue
- * @buf: pointer to array of SBALS
- * @first: integer specifying the SBAL number to start
- * @count: integer specifying the number of SBALS to process
- */
-void zfcp_qdio_zero_sbals(struct qdio_buffer *sbal[], int first, int count)
-{
-	int i, sbal_idx;
-
-	for (i = first; i < first + count; i++) {
-		sbal_idx = i % QDIO_MAX_BUFFERS_PER_Q;
-		memset(sbal[sbal_idx], 0, sizeof(struct qdio_buffer));
-	}
-}
-
-/**
  * zfcp_qdio_allocate - allocate queue memory and initialize QDIO data
  * @adapter: pointer to struct zfcp_adapter
  * Returns: -ENOMEM on memory allocation error or return value from
--- a/drivers/s390/scsi/zfcp_def.h	2008-06-27 18:07:57.000000000 +0200
+++ b/drivers/s390/scsi/zfcp_def.h	2008-06-27 18:08:22.000000000 +0200
@@ -100,8 +100,6 @@ zfcp_address_to_sg(void *address, struct
 
 #define ZFCP_TYPE2_RECOVERY_TIME        8	/* seconds */
 
-#define QBUFF_PER_PAGE			(PAGE_SIZE / sizeof(struct qdio_buffer))
-
 /********************* FSF SPECIFIC DEFINES *********************************/
 
 #define ZFCP_ULP_INFO_VERSION                   26

-- 

  parent reply	other threads:[~2008-07-02  8:56 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-02  8:56 [patch 00/11] Updated zfcp patches for 2.6.27 Christof Schmitt
2008-07-02  8:56 ` [patch 01/11] zfcp: wait until adapter is finished with ERP during auto-port Christof Schmitt
2008-07-02  8:56 ` [patch 02/11] zfcp: Fix error checking for ELS ADISC requests Christof Schmitt
2008-07-02  8:56 ` [patch 03/11] zfcp: Adapter reopen for large number of unsolicited status Christof Schmitt
2008-07-02  8:56 ` Christof Schmitt [this message]
2008-07-02  8:56 ` [patch 05/11] zfcp: Move status accessors from zfcp to SCSI include file Christof Schmitt
2008-07-02  8:56 ` [patch 06/11] zfcp: Cleanup of code in zfcp_scsi.c Christof Schmitt
2008-07-02  8:56 ` [patch 07/11] zfcp: Cleanup of code in zfcp_aux.c Christof Schmitt
2008-07-02  8:56 ` [patch 08/11] zfcp: consolidate sysfs things into one file Christof Schmitt
2008-07-02  8:56 ` [patch 09/11] zfcp: zfcp_fsf cleanup Christof Schmitt
2008-07-02  8:56 ` [patch 10/11] zfcp: Cleanup code in zfcp_erp.c Christof Schmitt
2008-07-02  8:56 ` [patch 11/11] zfcp: Cleanup external header file Christof Schmitt
     [not found] ` <1214992150.4974.16.camel@subratamodak.linux.ibm.com>
2008-07-02 11:31   ` [patch 00/11] Updated zfcp patches for 2.6.27 Christof Schmitt
  -- strict thread matches above, loose matches on Subject: below --
2008-06-30 10:52 [patch 00/11] zfcp updates " christof.schmitt
2008-06-30 10:52 ` [patch 04/11] zfcp: Small QDIO cleanups 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=20080702085949.267806000@de.ibm.com \
    --to=christof.schmitt@de.ibm.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=linux-s390@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=swen@vnet.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