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