From: Guangguan Wang <guangguan.wang@linux.alibaba.com>
To: Paolo Abeni <pabeni@redhat.com>
Cc: kgraul@linux.ibm.com, davem@davemloft.net, kuba@kernel.org,
linux-s390@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net 2/2] net/smc: align the connect behaviour with TCP
Date: Tue, 10 May 2022 21:03:17 +0800 [thread overview]
Message-ID: <a43ef532-17fb-43f8-35fb-8e40fdaae472@linux.alibaba.com> (raw)
In-Reply-To: <b826a78efa5e015b93038f5f8564ca7e98e1240a.camel@redhat.com>
On 2022/5/10 19:05, Paolo Abeni wrote:
>> } else {
>> rc = __smc_connect(smc);
>> - if (rc < 0)
>> + if (rc < 0) {
>> goto out;
>> - else
>> + } else {
>> rc = 0; /* success cases including fallback */
>> + sock->state = SS_CONNECTED;
>
> 'else' is not needed here, you can keep the above 2 statements dropping
> an indentation level.
>
>> + }
>> }
>>
>
> You can avoid a little code duplication adding here the following:
>
> connected:
> sock->state = SS_CONNECTED;
>
> and using the new label where appropriate.
>
Got it, I will modify it in the next version.
Thanks.
prev parent reply other threads:[~2022-05-10 13:03 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-09 11:58 [PATCH net 0/2] net/smc: two fixes for using smc with io_uring Guangguan Wang
2022-05-09 11:58 ` [PATCH net 1/2] net/smc: non blocking recvmsg() return -EAGAIN when no data and signal_pending Guangguan Wang
2022-05-10 3:23 ` Tony Lu
2022-05-09 11:58 ` [PATCH net 2/2] net/smc: align the connect behaviour with TCP Guangguan Wang
2022-05-10 9:30 ` Tony Lu
2022-05-10 12:58 ` Guangguan Wang
2022-05-11 13:32 ` Tony Lu
2022-05-10 11:05 ` Paolo Abeni
2022-05-10 13:03 ` Guangguan Wang [this message]
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=a43ef532-17fb-43f8-35fb-8e40fdaae472@linux.alibaba.com \
--to=guangguan.wang@linux.alibaba.com \
--cc=davem@davemloft.net \
--cc=kgraul@linux.ibm.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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