From: Martin Schwidefsky <schwidefsky@de.ibm.com>
To: linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org
Cc: jang@linux.vnet.ibm.com, Cornelia Huck <cornelia.huck@de.ibm.com>,
Martin Schwidefsky <schwidefsky@de.ibm.com>
Subject: [patch 1/5] cio: Export chsc_error_from_response().
Date: Tue, 01 Jul 2008 16:05:52 +0200 [thread overview]
Message-ID: <20080701140624.096181346@de.ibm.com> (raw)
In-Reply-To: 20080701140551.168274793@de.ibm.com
[-- Attachment #1: 200-nqdio-chsc.diff --]
[-- Type: text/plain, Size: 1657 bytes --]
From: Cornelia Huck <cornelia.huck@de.ibm.com>
Make chsc_error_from_response() available to chsc callers outside
of chsc.c (namely qdio) to avoid duplicating error checking code.
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
---
drivers/s390/cio/chsc.c | 9 ++++++++-
drivers/s390/cio/chsc.h | 2 ++
2 files changed, 10 insertions(+), 1 deletion(-)
Index: quilt-2.6/drivers/s390/cio/chsc.c
===================================================================
--- quilt-2.6.orig/drivers/s390/cio/chsc.c
+++ quilt-2.6/drivers/s390/cio/chsc.c
@@ -27,7 +27,13 @@
static void *sei_page;
-static int chsc_error_from_response(int response)
+/**
+ * chsc_error_from_response() - convert a chsc response to an error
+ * @response: chsc response code
+ *
+ * Returns an appropriate Linux error code for @response.
+ */
+int chsc_error_from_response(int response)
{
switch (response) {
case 0x0001:
@@ -45,6 +51,7 @@ static int chsc_error_from_response(int
return -EIO;
}
}
+EXPORT_SYMBOL_GPL(chsc_error_from_response);
struct chsc_ssd_area {
struct chsc_header request;
Index: quilt-2.6/drivers/s390/cio/chsc.h
===================================================================
--- quilt-2.6.orig/drivers/s390/cio/chsc.h
+++ quilt-2.6/drivers/s390/cio/chsc.h
@@ -101,4 +101,6 @@ void chsc_chp_online(struct chp_id chpid
void chsc_chp_offline(struct chp_id chpid);
int chsc_get_channel_measurement_chars(struct channel_path *chp);
+int chsc_error_from_response(int response);
+
#endif
--
blue skies,
Martin.
"Reality continues to ruin my life." - Calvin.
next prev parent reply other threads:[~2008-07-01 14:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-01 14:05 [patch 0/5] [RFC] new qdio driver Martin Schwidefsky
2008-07-01 14:05 ` Martin Schwidefsky [this message]
2008-07-01 14:05 ` [patch 2/5] qdio: new qdio driver, part 1 Martin Schwidefsky
2008-07-01 14:05 ` [patch 3/5] qdio: new qdio driver, part 2 Martin Schwidefsky
2008-07-01 14:05 ` [patch 4/5] qeth: adapt to new qdio driver Martin Schwidefsky
2008-07-01 14:05 ` [patch 5/5] zfcp: " Martin Schwidefsky
2008-07-01 14:44 ` 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=20080701140624.096181346@de.ibm.com \
--to=schwidefsky@de.ibm.com \
--cc=cornelia.huck@de.ibm.com \
--cc=jang@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
/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