From 81594e7e7a146888f0bac4fa782b0b5d3c37fdff Mon Sep 17 00:00:00 2001 From: Dmitrii Bundin Date: Mon, 9 Jan 2023 21:58:54 +0300 Subject: [PATCH] io_uring: remove excessive unlikely on IS_ERR The IS_ERR function uses the IS_ERR_VALUE macro under the hood which already wraps the condition into unlikely. Signed-off-by: Dmitrii Bundin Link: https://lore.kernel.org/r/20230109185854.25698-1-dmitrii.bundin.a@gmail.com Signed-off-by: Jens Axboe --- io_uring/rw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/io_uring/rw.c b/io_uring/rw.c index 9c3ddd4..3a3aef7 100644 --- a/io_uring/rw.c +++ b/io_uring/rw.c @@ -410,7 +410,7 @@ static inline int io_import_iovec(int rw, struct io_kiocb *req, unsigned int issue_flags) { *iovec = __io_import_iovec(rw, req, s, issue_flags); - if (unlikely(IS_ERR(*iovec))) + if (IS_ERR(*iovec)) return PTR_ERR(*iovec); iov_iter_save_state(&s->iter, &s->iter_state); -- 2.7.4