From: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
To: "Enrico Weigelt, metux IT consult" <info@metux.net>
Cc: linux-kernel@vger.kernel.org, vyasevich@gmail.com,
nhorman@tuxdriver.com, davem@davemloft.net,
linux-sctp@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH] net: sctp: drop unneeded likely() call around IS_ERR()
Date: Mon, 29 Jul 2019 19:03:52 +0000 [thread overview]
Message-ID: <20190729190352.GD4064@localhost.localdomain> (raw)
In-Reply-To: <1564426521-22525-1-git-send-email-info@metux.net>
On Mon, Jul 29, 2019 at 08:55:21PM +0200, Enrico Weigelt, metux IT consult wrote:
> From: Enrico Weigelt <info@metux.net>
>
> IS_ERR() already calls unlikely(), so this extra unlikely() call
> around IS_ERR() is not needed.
>
> Signed-off-by: Enrico Weigelt <info@metux.net>
Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
> ---
> net/sctp/socket.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/net/sctp/socket.c b/net/sctp/socket.c
> index aa80cda..9d1f83b 100644
> --- a/net/sctp/socket.c
> +++ b/net/sctp/socket.c
> @@ -985,7 +985,7 @@ static int sctp_setsockopt_bindx(struct sock *sk,
> return -EINVAL;
>
> kaddrs = memdup_user(addrs, addrs_size);
> - if (unlikely(IS_ERR(kaddrs)))
> + if (IS_ERR(kaddrs))
> return PTR_ERR(kaddrs);
>
> /* Walk through the addrs buffer and count the number of addresses. */
> @@ -1315,7 +1315,7 @@ static int __sctp_setsockopt_connectx(struct sock *sk,
> return -EINVAL;
>
> kaddrs = memdup_user(addrs, addrs_size);
> - if (unlikely(IS_ERR(kaddrs)))
> + if (IS_ERR(kaddrs))
> return PTR_ERR(kaddrs);
>
> /* Allow security module to validate connectx addresses. */
> --
> 1.9.1
>
WARNING: multiple messages have this Message-ID (diff)
From: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
To: "Enrico Weigelt, metux IT consult" <info@metux.net>
Cc: linux-kernel@vger.kernel.org, vyasevich@gmail.com,
nhorman@tuxdriver.com, davem@davemloft.net,
linux-sctp@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH] net: sctp: drop unneeded likely() call around IS_ERR()
Date: Mon, 29 Jul 2019 16:03:52 -0300 [thread overview]
Message-ID: <20190729190352.GD4064@localhost.localdomain> (raw)
In-Reply-To: <1564426521-22525-1-git-send-email-info@metux.net>
On Mon, Jul 29, 2019 at 08:55:21PM +0200, Enrico Weigelt, metux IT consult wrote:
> From: Enrico Weigelt <info@metux.net>
>
> IS_ERR() already calls unlikely(), so this extra unlikely() call
> around IS_ERR() is not needed.
>
> Signed-off-by: Enrico Weigelt <info@metux.net>
Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
> ---
> net/sctp/socket.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/net/sctp/socket.c b/net/sctp/socket.c
> index aa80cda..9d1f83b 100644
> --- a/net/sctp/socket.c
> +++ b/net/sctp/socket.c
> @@ -985,7 +985,7 @@ static int sctp_setsockopt_bindx(struct sock *sk,
> return -EINVAL;
>
> kaddrs = memdup_user(addrs, addrs_size);
> - if (unlikely(IS_ERR(kaddrs)))
> + if (IS_ERR(kaddrs))
> return PTR_ERR(kaddrs);
>
> /* Walk through the addrs buffer and count the number of addresses. */
> @@ -1315,7 +1315,7 @@ static int __sctp_setsockopt_connectx(struct sock *sk,
> return -EINVAL;
>
> kaddrs = memdup_user(addrs, addrs_size);
> - if (unlikely(IS_ERR(kaddrs)))
> + if (IS_ERR(kaddrs))
> return PTR_ERR(kaddrs);
>
> /* Allow security module to validate connectx addresses. */
> --
> 1.9.1
>
next prev parent reply other threads:[~2019-07-29 19:03 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-05 21:03 [PATCH] net: sctp: drop unneeded likely() call around IS_ERR() Enrico Weigelt, metux IT consult
2019-06-05 21:03 ` Enrico Weigelt, metux IT consult
2019-06-05 21:50 ` Marcelo Ricardo Leitner
2019-06-05 21:50 ` Marcelo Ricardo Leitner
2019-06-05 22:53 ` Enrico Weigelt, metux IT consult
2019-06-05 22:53 ` Enrico Weigelt, metux IT consult
2019-06-05 23:58 ` David Miller
2019-06-05 23:58 ` David Miller
2019-07-29 18:55 ` Enrico Weigelt, metux IT consult
2019-07-29 18:55 ` Enrico Weigelt, metux IT consult
2019-07-29 19:03 ` Marcelo Ricardo Leitner [this message]
2019-07-29 19:03 ` Marcelo Ricardo Leitner
2019-07-29 21:02 ` David Miller
2019-07-29 21:02 ` 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=20190729190352.GD4064@localhost.localdomain \
--to=marcelo.leitner@gmail.com \
--cc=davem@davemloft.net \
--cc=info@metux.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sctp@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nhorman@tuxdriver.com \
--cc=vyasevich@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.