netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: sctp: drop unneeded likely() call around IS_ERR()
@ 2019-07-29 18:55 Enrico Weigelt, metux IT consult
  2019-07-29 19:03 ` Marcelo Ricardo Leitner
  2019-07-29 21:02 ` David Miller
  0 siblings, 2 replies; 7+ messages in thread
From: Enrico Weigelt, metux IT consult @ 2019-07-29 18:55 UTC (permalink / raw)
  To: linux-kernel
  Cc: vyasevich, nhorman, marcelo.leitner, davem, linux-sctp, netdev

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>
---
 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


^ permalink raw reply related	[flat|nested] 7+ messages in thread
* [PATCH] net: sctp: drop unneeded likely() call around IS_ERR()
@ 2019-06-05 21:03 Enrico Weigelt, metux IT consult
  2019-06-05 21:50 ` Marcelo Ricardo Leitner
  2019-06-05 23:58 ` David Miller
  0 siblings, 2 replies; 7+ messages in thread
From: Enrico Weigelt, metux IT consult @ 2019-06-05 21:03 UTC (permalink / raw)
  To: linux-kernel
  Cc: vyasevich, nhorman, marcelo.leitner, davem, linux-sctp, netdev

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>
---
 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 39ea0a3..c7b0f51 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


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-07-29 21:02 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-29 18:55 [PATCH] net: sctp: drop unneeded likely() call around IS_ERR() Enrico Weigelt, metux IT consult
2019-07-29 19:03 ` Marcelo Ricardo Leitner
2019-07-29 21:02 ` David Miller
  -- strict thread matches above, loose matches on Subject: below --
2019-06-05 21:03 Enrico Weigelt, metux IT consult
2019-06-05 21:50 ` Marcelo Ricardo Leitner
2019-06-05 22:53   ` Enrico Weigelt, metux IT consult
2019-06-05 23:58 ` David Miller

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).