Skip to content

Commit

Permalink
[S390] cio: Export chsc_error_from_response().
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
  • Loading branch information
Cornelia Huck authored and Heiko Carstens committed Jul 17, 2008
1 parent b9993a3 commit dae3984
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 8 additions & 1 deletion drivers/s390/cio/chsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -45,6 +51,7 @@ static int chsc_error_from_response(int response)
return -EIO;
}
}
EXPORT_SYMBOL_GPL(chsc_error_from_response);

struct chsc_ssd_area {
struct chsc_header request;
Expand Down
2 changes: 2 additions & 0 deletions drivers/s390/cio/chsc.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit dae3984

Please sign in to comment.