diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2012-09-06 08:42:13 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2012-09-26 09:45:12 -0400 |
commit | caf757c609445b01ad845df160369d8ccfd97d5b (patch) | |
tree | ea281a82383c15ed92ec64e88c4b1b55462d9c6e /drivers | |
parent | 94f2b9e25dc4d71b12cd16b6786cdef52b34a931 (diff) |
s390/sysinfo,stsi: change return code handling
Change return code handling of the stsi() function:
In case function code 0 was specified the return value is the
current configuration level (already shifted). That way all
the code that actually copied the stsi_0() function can go
away.
Otherwise the return value is 0 (success) or negative to
indicate an error (currently only -EOPNOTSUPP).
Also stsi() is no longer an inline function. The function is
not performance critical, but every caller would generate an
exception table entry for this function.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/s390/net/qeth_core_main.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c index 7a8b09612c41..cf6da7fafe54 100644 --- a/drivers/s390/net/qeth_core_main.c +++ b/drivers/s390/net/qeth_core_main.c | |||
@@ -2993,7 +2993,7 @@ static void qeth_get_trap_id(struct qeth_card *card, struct qeth_trap_id *tid) | |||
2993 | struct sysinfo_2_2_2 *info222 = (struct sysinfo_2_2_2 *)info; | 2993 | struct sysinfo_2_2_2 *info222 = (struct sysinfo_2_2_2 *)info; |
2994 | struct sysinfo_3_2_2 *info322 = (struct sysinfo_3_2_2 *)info; | 2994 | struct sysinfo_3_2_2 *info322 = (struct sysinfo_3_2_2 *)info; |
2995 | struct ccw_dev_id ccwid; | 2995 | struct ccw_dev_id ccwid; |
2996 | int level, rc; | 2996 | int level; |
2997 | 2997 | ||
2998 | tid->chpid = card->info.chpid; | 2998 | tid->chpid = card->info.chpid; |
2999 | ccw_device_get_id(CARD_RDEV(card), &ccwid); | 2999 | ccw_device_get_id(CARD_RDEV(card), &ccwid); |
@@ -3001,17 +3001,10 @@ static void qeth_get_trap_id(struct qeth_card *card, struct qeth_trap_id *tid) | |||
3001 | tid->devno = ccwid.devno; | 3001 | tid->devno = ccwid.devno; |
3002 | if (!info) | 3002 | if (!info) |
3003 | return; | 3003 | return; |
3004 | 3004 | level = stsi(NULL, 0, 0, 0); | |
3005 | rc = stsi(NULL, 0, 0, 0); | 3005 | if ((level >= 2) && (stsi(info222, 2, 2, 2) == 0)) |
3006 | if (rc == -ENOSYS) | ||
3007 | level = rc; | ||
3008 | else | ||
3009 | level = (((unsigned int) rc) >> 28); | ||
3010 | |||
3011 | if ((level >= 2) && (stsi(info222, 2, 2, 2) != -ENOSYS)) | ||
3012 | tid->lparnr = info222->lpar_number; | 3006 | tid->lparnr = info222->lpar_number; |
3013 | 3007 | if ((level >= 3) && (stsi(info322, 3, 2, 2) == 0)) { | |
3014 | if ((level >= 3) && (stsi(info322, 3, 2, 2) != -ENOSYS)) { | ||
3015 | EBCASC(info322->vm[0].name, sizeof(info322->vm[0].name)); | 3008 | EBCASC(info322->vm[0].name, sizeof(info322->vm[0].name)); |
3016 | memcpy(tid->vmname, info322->vm[0].name, sizeof(tid->vmname)); | 3009 | memcpy(tid->vmname, info322->vm[0].name, sizeof(tid->vmname)); |
3017 | } | 3010 | } |