From: Eric Dumazet <eric.dumazet@gmail.com>
To: 13145886936@163.com, davem@davemloft.net, kuba@kernel.org
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
gushengxian <gushengxian@yulong.com>
Subject: Re: [PATCH] net: caif: add a return statement
Date: Wed, 23 Jun 2021 12:50:13 +0200 [thread overview]
Message-ID: <151e4f4b-d3e9-5d46-d17f-04346a203f0e@gmail.com> (raw)
In-Reply-To: <20210623013238.9204-1-13145886936@163.com>
On 6/23/21 3:32 AM, 13145886936@163.com wrote:
> From: gushengxian <gushengxian@yulong.com>
>
> Return statement is needed in every condition in Int function.
??? Are you a bot ??
Is it a real patch. How was it tested ?
> Fixed some grammar issues.
>
> Signed-off-by: gushengxian <gushengxian@yulong.com>
> ---
> net/caif/caif_socket.c | 9 +++++----
> 1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/net/caif/caif_socket.c b/net/caif/caif_socket.c
> index 3ad0a1df6712..84a00b9cb0dc 100644
> --- a/net/caif/caif_socket.c
> +++ b/net/caif/caif_socket.c
> @@ -281,7 +281,7 @@ static int caif_seqpkt_recvmsg(struct socket *sock, struct msghdr *m,
> if (flags & MSG_OOB)
> goto read_error;
>
> - skb = skb_recv_datagram(sk, flags, 0 , &ret);
> + skb = skb_recv_datagram(sk, flags, 0, &ret);
> if (!skb)
> goto read_error;
> copylen = skb->len;
> @@ -295,6 +295,7 @@ static int caif_seqpkt_recvmsg(struct socket *sock, struct msghdr *m,
> goto out_free;
>
> ret = (flags & MSG_TRUNC) ? skb->len : copylen;
> + return ret;
This is completely bogus.
> out_free:
> skb_free_datagram(sk, skb);
> caif_check_flow_release(sk);
> @@ -615,7 +616,7 @@ static int caif_stream_sendmsg(struct socket *sock, struct msghdr *msg,
>
> while (sent < len) {
>
> - size = len-sent;
> + size = len - sent;
>
> if (size > cf_sk->maxframe)
> size = cf_sk->maxframe;
> @@ -815,8 +816,8 @@ static int caif_connect(struct socket *sock, struct sockaddr *uaddr,
> sock->state = SS_CONNECTING;
> sk->sk_state = CAIF_CONNECTING;
>
> - /* Check priority value comming from socket */
> - /* if priority value is out of range it will be ajusted */
> + /* Check priority value coming from socket */
> + /* if priority value is out of range it will be adjusted */
> if (cf_sk->sk.sk_priority > CAIF_PRIO_MAX)
> cf_sk->conn_req.priority = CAIF_PRIO_MAX;
> else if (cf_sk->sk.sk_priority < CAIF_PRIO_MIN)
>
prev parent reply other threads:[~2021-06-23 10:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-23 1:32 13145886936
2021-06-23 10:50 ` Eric Dumazet [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=151e4f4b-d3e9-5d46-d17f-04346a203f0e@gmail.com \
--to=eric.dumazet@gmail.com \
--cc=13145886936@163.com \
--cc=davem@davemloft.net \
--cc=gushengxian@yulong.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/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
all inboxes | Powered by JetHome®