Skip to contentSkip to conversation

io_uring: remove excessive unlikely on IS_ERR

PATCH Applied Dmitrii Bundin 2 participants 2 messages Jan 9, 2023 io_uring

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 io_uring/rw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
io_uring/rw.c +1 -1
index 8227af2e1c0f..27d5e3323a53 100644
@@ -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);
Signature · 1 line
2.17.1
maintainer Applied
#1 lore raw
Quoted 4 lines · Dmitrii Bundin

The IS_ERR function uses the IS_ERR_VALUE macro under the hood which already wraps the condition into unlikely.

Applied, thanks!

[1/1] io_uring: remove excessive unlikely on IS_ERR

      commit: 119fda37c54736ea65a669273d0b3c394c99a75c

Best regards,

Signature · 1 line
Jens Axboe