From: Ursula Braun <ubraun@linux.ibm.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, linux-s390@vger.kernel.org,
schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com,
raspl@linux.ibm.com, kgraul@linux.ibm.com, ubraun@linux.ibm.com
Subject: [PATCH net-next 1/6] net/smc: cleanup for smcr_tx_sndbuf_nonempty
Date: Thu, 21 Feb 2019 13:00:58 +0100 [thread overview]
Message-ID: <20190221120103.10866-2-ubraun@linux.ibm.com> (raw)
In-Reply-To: <20190221120103.10866-1-ubraun@linux.ibm.com>
Use local variable pflags from the beginning of function
smcr_tx_sndbuf_nonempty
Signed-off-by: Ursula Braun <ubraun@linux.ibm.com>
---
net/smc/smc_tx.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/net/smc/smc_tx.c b/net/smc/smc_tx.c
index a3bff08ff8c8..f0de323d15d6 100644
--- a/net/smc/smc_tx.c
+++ b/net/smc/smc_tx.c
@@ -483,7 +483,7 @@ static int smc_tx_rdma_writes(struct smc_connection *conn,
*/
static int smcr_tx_sndbuf_nonempty(struct smc_connection *conn)
{
- struct smc_cdc_producer_flags *pflags;
+ struct smc_cdc_producer_flags *pflags = &conn->local_tx_ctrl.prod_flags;
struct smc_rdma_wr *wr_rdma_buf;
struct smc_cdc_tx_pend *pend;
struct smc_wr_buf *wr_buf;
@@ -506,7 +506,7 @@ static int smcr_tx_sndbuf_nonempty(struct smc_connection *conn)
}
spin_lock_bh(&conn->send_lock);
- if (!conn->local_tx_ctrl.prod_flags.urg_data_present) {
+ if (!pflags->urg_data_present) {
rc = smc_tx_rdma_writes(conn, wr_rdma_buf);
if (rc) {
smc_wr_tx_put_slot(&conn->lgr->lnk[SMC_SINGLE_LINK],
@@ -516,7 +516,6 @@ static int smcr_tx_sndbuf_nonempty(struct smc_connection *conn)
}
rc = smc_cdc_msg_send(conn, wr_buf, pend);
- pflags = &conn->local_tx_ctrl.prod_flags;
if (!rc && pflags->urg_data_present) {
pflags->urg_data_pending = 0;
pflags->urg_data_present = 0;
--
2.16.4
next prev parent reply other threads:[~2019-02-21 12:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-21 12:00 [PATCH net-next 0/6] net/smc: patches 2019-02-21 Ursula Braun
2019-02-21 12:00 ` Ursula Braun [this message]
2019-02-21 12:00 ` [PATCH net-next 2/6] s390/net: convert pnetids to ascii Ursula Braun
2019-02-21 12:01 ` [PATCH net-next 3/6] net/smc: rework pnet table Ursula Braun
2019-02-21 12:01 ` [PATCH net-next 4/6] net/smc: add smcd support to the " Ursula Braun
2019-02-21 12:01 ` [PATCH net-next 5/6] net/smc: add pnet table namespace support Ursula Braun
2019-02-21 12:01 ` [PATCH net-next 6/6] net/smc: allow PCI IDs as ib device names in the pnet table Ursula Braun
2019-02-21 18:36 ` [PATCH net-next 0/6] net/smc: patches 2019-02-21 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=20190221120103.10866-2-ubraun@linux.ibm.com \
--to=ubraun@linux.ibm.com \
--cc=davem@davemloft.net \
--cc=heiko.carstens@de.ibm.com \
--cc=kgraul@linux.ibm.com \
--cc=linux-s390@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=raspl@linux.ibm.com \
--cc=schwidefsky@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).