public inbox for [email protected]
 help / color / mirror / Atom feed
From: Pavel Begunkov <[email protected]>
To: [email protected]
Cc: Jens Axboe <[email protected]>, [email protected]
Subject: [PATCH 2/3] io_uring: simplify io_pages_free
Date: Wed, 13 Mar 2024 15:52:40 +0000	[thread overview]
Message-ID: <0e1a46f9a5cd38e6876905e8030bdff9b0845e96.1710343154.git.asml.silence@gmail.com> (raw)
In-Reply-To: <[email protected]>

We never pass a null (top-level) pointer, remove the check.

Signed-off-by: Pavel Begunkov <[email protected]>
---
 io_uring/io_uring.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c
index 1d0eac0cc8aa..cfe1413511ca 100644
--- a/io_uring/io_uring.c
+++ b/io_uring/io_uring.c
@@ -2696,13 +2696,9 @@ void io_mem_free(void *ptr)
 
 static void io_pages_free(struct page ***pages, int npages)
 {
-	struct page **page_array;
+	struct page **page_array = *pages;
 	int i;
 
-	if (!pages)
-		return;
-
-	page_array = *pages;
 	if (!page_array)
 		return;
 
-- 
2.43.0


  parent reply	other threads:[~2024-03-13 16:06 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-13 15:52 [PATCH 0/3] small rings clean up Pavel Begunkov
2024-03-13 15:52 ` [PATCH 1/3] io_uring: simplify io_mem_alloc return values Pavel Begunkov
2024-03-13 20:50   ` Jens Axboe
2024-03-13 20:43     ` Pavel Begunkov
2024-03-13 21:02       ` Jens Axboe
2024-03-13 22:32   ` Gabriel Krisman Bertazi
2024-03-13 23:24     ` Jens Axboe
2024-03-13 23:43       ` Gabriel Krisman Bertazi
2024-03-13 23:44         ` Jens Axboe
2024-03-13 15:52 ` Pavel Begunkov [this message]
2024-03-13 15:52 ` [PATCH 3/3] io_uring/kbuf: rename is_mapped Pavel Begunkov
2024-03-13 20:27 ` [PATCH 0/3] small rings clean up Jens Axboe

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=0e1a46f9a5cd38e6876905e8030bdff9b0845e96.1710343154.git.asml.silence@gmail.com \
    [email protected] \
    [email protected] \
    [email protected] \
    /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