linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] zsmalloc: fixup zsmalloc-introduce-sg-list-based-object-read-api.patch
       [not found] <20260114001121.5B6ADC19421@smtp.kernel.org>
@ 2026-01-17  2:48 ` Sergey Senozhatsky
  0 siblings, 0 replies; only message in thread
From: Sergey Senozhatsky @ 2026-01-17  2:48 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, linux-mm, Sergey Senozhatsky

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



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-01-17  2:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20260114001121.5B6ADC19421@smtp.kernel.org>
2026-01-17  2:48 ` [PATCH] zsmalloc: fixup zsmalloc-introduce-sg-list-based-object-read-api.patch Sergey Senozhatsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox