From: Sergey Senozhatsky <senozhatsky@chromium.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
Sergey Senozhatsky <senozhatsky@chromium.org>
Subject: [PATCH] zsmalloc: fixup zsmalloc-introduce-sg-list-based-object-read-api.patch
Date: Sat, 17 Jan 2026 11:48:40 +0900 [thread overview]
Message-ID: <20260117024900.792237-1-senozhatsky@chromium.org> (raw)
In-Reply-To: <20260114001121.5B6ADC19421@smtp.kernel.org>
zs_obj_read_sg_begin() always returns 0, convert it to void (per Yosry).
Signed-off-by: Sergey Senozhatsky <senozhatsky@chromium.org>
---
include/linux/zsmalloc.h | 4 ++--
mm/zsmalloc.c | 6 ++----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/include/linux/zsmalloc.h b/include/linux/zsmalloc.h
index 11e614663dd3..478410c880b1 100644
--- a/include/linux/zsmalloc.h
+++ b/include/linux/zsmalloc.h
@@ -44,8 +44,8 @@ void *zs_obj_read_begin(struct zs_pool *pool, unsigned long handle,
size_t mem_len, void *local_copy);
void zs_obj_read_end(struct zs_pool *pool, unsigned long handle,
size_t mem_len, void *handle_mem);
-int zs_obj_read_sg_begin(struct zs_pool *pool, unsigned long handle,
- struct scatterlist *sg, size_t mem_len);
+void zs_obj_read_sg_begin(struct zs_pool *pool, unsigned long handle,
+ struct scatterlist *sg, size_t mem_len);
void zs_obj_read_sg_end(struct zs_pool *pool, unsigned long handle);
void zs_obj_write(struct zs_pool *pool, unsigned long handle,
void *handle_mem, size_t mem_len);
diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
index 5abb8bc0956a..5a68349403d5 100644
--- a/mm/zsmalloc.c
+++ b/mm/zsmalloc.c
@@ -1147,8 +1147,8 @@ void zs_obj_read_end(struct zs_pool *pool, unsigned long handle,
}
EXPORT_SYMBOL_GPL(zs_obj_read_end);
-int zs_obj_read_sg_begin(struct zs_pool *pool, unsigned long handle,
- struct scatterlist *sg, size_t mem_len)
+void zs_obj_read_sg_begin(struct zs_pool *pool, unsigned long handle,
+ struct scatterlist *sg, size_t mem_len)
{
struct zspage *zspage;
struct zpdesc *zpdesc;
@@ -1191,8 +1191,6 @@ int zs_obj_read_sg_begin(struct zs_pool *pool, unsigned long handle,
sg_set_page(sg, zpdesc_page(zpdesc), sizes[1], 0);
}
-
- return 0;
}
EXPORT_SYMBOL_GPL(zs_obj_read_sg_begin);
--
2.52.0.457.g6b5491de43-goog
parent reply other threads:[~2026-01-17 2:49 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20260114001121.5B6ADC19421@smtp.kernel.org>]
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=20260117024900.792237-1-senozhatsky@chromium.org \
--to=senozhatsky@chromium.org \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
/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