From: Ursula Braun <ubraun@linux.vnet.ibm.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, linux-s390@vger.kernel.org,
ursula.braun@de.ibm.com, ubraun@linux.vnet.ibm.com,
Eugene Crosser <Eugene.Crosser@ru.ibm.com>
Subject: [PATCH net-next 2/8] qeth: fix handling of IPA return codes
Date: Mon, 18 May 2015 14:27:53 +0200 [thread overview]
Message-ID: <1431952079-6847-3-git-send-email-ubraun@linux.vnet.ibm.com> (raw)
In-Reply-To: <1431952079-6847-1-git-send-email-ubraun@linux.vnet.ibm.com>
From: Eugene Crosser <Eugene.Crosser@ru.ibm.com>
Function that executes IPA commands returns the result code from the
IPA response block. If non-negative, it needs to be transformed into
errno-compatible code before returning to the caller.
Signed-off-by: Eugene Crosser <Eugene.Crosser@ru.ibm.com>
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
---
drivers/s390/net/qeth_l2_main.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/s390/net/qeth_l2_main.c b/drivers/s390/net/qeth_l2_main.c
index 0ea0869..1cdefae 100644
--- a/drivers/s390/net/qeth_l2_main.c
+++ b/drivers/s390/net/qeth_l2_main.c
@@ -1808,10 +1808,9 @@ int qeth_bridgeport_query_ports(struct qeth_card *card,
cmd->data.sbp.hdr.seq_no = 1;
rc = qeth_send_ipa_cmd(card, iob, qeth_bridgeport_query_ports_cb,
(void *)&cbctl);
- if (rc)
+ if (rc < 0)
return rc;
- rc = qeth_bridgeport_makerc(card, &cbctl, IPA_SBP_QUERY_BRIDGE_PORTS);
- return rc;
+ return qeth_bridgeport_makerc(card, &cbctl, IPA_SBP_QUERY_BRIDGE_PORTS);
}
EXPORT_SYMBOL_GPL(qeth_bridgeport_query_ports);
@@ -1874,10 +1873,9 @@ int qeth_bridgeport_setrole(struct qeth_card *card, enum qeth_sbp_roles role)
cmd->data.sbp.hdr.seq_no = 1;
rc = qeth_send_ipa_cmd(card, iob, qeth_bridgeport_set_cb,
(void *)&cbctl);
- if (rc)
+ if (rc < 0)
return rc;
- rc = qeth_bridgeport_makerc(card, &cbctl, setcmd);
- return rc;
+ return qeth_bridgeport_makerc(card, &cbctl, setcmd);
}
/**
--
2.3.7
next prev parent reply other threads:[~2015-05-18 12:27 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-18 12:27 [PATCH net-next 0/8] s390: network patches for net-next Ursula Braun
2015-05-18 12:27 ` [PATCH net-next 1/8] qeth: fix rx checksum offload handling Ursula Braun
2015-05-18 12:27 ` Ursula Braun [this message]
2015-05-18 12:27 ` [PATCH net-next 3/8] qeth: remove locks from sysfs _show Ursula Braun
2015-05-18 12:27 ` [PATCH net-next 4/8] qeth: IFF_PROMISC flag to BRIDGE PORT mode Ursula Braun
2015-05-18 12:27 ` [PATCH net-next 5/8] qeth: OSA version of SETBRIDGEPORT command Ursula Braun
2015-05-18 12:27 ` [PATCH net-next 6/8] qeth: BRIDGEPORT "sanity check" Ursula Braun
2015-05-18 12:27 ` [PATCH net-next 7/8] qeth: replace ENOSYS with EOPNOTSUPP Ursula Braun
2015-05-18 12:27 ` [PATCH net-next 8/8] s390/lcs: Fix null-pointer access in msg Ursula Braun
2015-05-18 16:16 ` [PATCH net-next 0/8] s390: network patches for net-next David Miller
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=1431952079-6847-3-git-send-email-ubraun@linux.vnet.ibm.com \
--to=ubraun@linux.vnet.ibm.com \
--cc=Eugene.Crosser@ru.ibm.com \
--cc=davem@davemloft.net \
--cc=linux-s390@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=ursula.braun@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).