[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20160525143006.1207-4-sergey.senozhatsky@gmail.com>
Date: Wed, 25 May 2016 23:30:02 +0900
From: Sergey Senozhatsky <sergey.senozhatsky@...il.com>
To: Minchan Kim <minchan@...nel.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Joonsoo Kim <iamjoonsoo.kim@....com>,
linux-kernel@...r.kernel.org,
Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>,
Sergey Senozhatsky <sergey.senozhatsky@...il.com>
Subject: [PATCH 3/7] zram: drop zcomp param from compress/decompress
We don't need to supply a zcomp pointer to compress/decompress
functions, drop it.
Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@...il.com>
Cc: Minchan Kim <minchan@...nel.org>
Cc: Joonsoo Kim <iamjoonsoo.kim@....com>
---
drivers/block/zram/zcomp.c | 5 ++---
drivers/block/zram/zcomp.h | 4 ++--
drivers/block/zram/zram_drv.c | 4 ++--
3 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/drivers/block/zram/zcomp.c b/drivers/block/zram/zcomp.c
index 82b568e..6e16fa2 100644
--- a/drivers/block/zram/zcomp.c
+++ b/drivers/block/zram/zcomp.c
@@ -102,7 +102,7 @@ void zcomp_stream_put(struct zcomp *comp)
put_cpu_ptr(comp->stream);
}
-int zcomp_compress(struct zcomp *comp, struct zcomp_strm *zstrm,
+int zcomp_compress(struct zcomp_strm *zstrm,
const unsigned char *src, unsigned int *dst_len)
{
/*
@@ -126,8 +126,7 @@ int zcomp_compress(struct zcomp *comp, struct zcomp_strm *zstrm,
zstrm->buffer, dst_len);
}
-int zcomp_decompress(struct zcomp *comp,
- struct zcomp_strm *zstrm,
+int zcomp_decompress(struct zcomp_strm *zstrm,
const unsigned char *src,
size_t src_len, unsigned char *dst)
{
diff --git a/drivers/block/zram/zcomp.h b/drivers/block/zram/zcomp.h
index ba36bde..3fb9dc4 100644
--- a/drivers/block/zram/zcomp.h
+++ b/drivers/block/zram/zcomp.h
@@ -53,10 +53,10 @@ void zcomp_destroy(struct zcomp *comp);
struct zcomp_strm *zcomp_stream_get(struct zcomp *comp);
void zcomp_stream_put(struct zcomp *comp);
-int zcomp_compress(struct zcomp *comp, struct zcomp_strm *zstrm,
+int zcomp_compress(struct zcomp_strm *zstrm,
const unsigned char *src, unsigned int *dst_len);
-int zcomp_decompress(struct zcomp *comp, struct zcomp_strm *zstrm,
+int zcomp_decompress(struct zcomp_strm *zstrm,
const unsigned char *src,
size_t src_len, unsigned char *dst);
diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
index fa22a32..99c8be7 100644
--- a/drivers/block/zram/zram_drv.c
+++ b/drivers/block/zram/zram_drv.c
@@ -581,7 +581,7 @@ static int zram_decompress_page(struct zram *zram, char *mem, u32 index)
} else {
struct zcomp_strm *zstrm = zcomp_stream_get(zram->comp);
- ret = zcomp_decompress(zram->comp, zstrm, cmem, size, mem);
+ ret = zcomp_decompress(zstrm, cmem, size, mem);
zcomp_stream_put(zram->comp);
}
zs_unmap_object(meta->mem_pool, handle);
@@ -700,7 +700,7 @@ compress_again:
}
zstrm = zcomp_stream_get(zram->comp);
- ret = zcomp_compress(zram->comp, zstrm, uncmem, &clen);
+ ret = zcomp_compress(zstrm, uncmem, &clen);
if (!is_partial_io(bvec)) {
kunmap_atomic(user_mem);
user_mem = NULL;
--
2.8.3.394.g3916adf
Powered by blists - more mailing lists