mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
To: Minchan Kim <minchan@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Joonsoo Kim <iamjoonsoo.kim@lge.com>,
	linux-kernel@vger.kernel.org,
	Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>,
	Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Subject: [PATCH v2 3/8] zram: align zcomp interface to crypto comp API
Date: Tue, 31 May 2016 21:20:12 +0900	[thread overview]
Message-ID: <20160531122017.2878-4-sergey.senozhatsky@gmail.com> (raw)
In-Reply-To: <20160531122017.2878-1-sergey.senozhatsky@gmail.com>

A cosmetic change:
update zcomp interface to be more aligned with the crypto API.

Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
---
 drivers/block/zram/zcomp.c    | 5 ++---
 drivers/block/zram/zcomp.h    | 5 ++---
 drivers/block/zram/zram_drv.c | 2 +-
 3 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/drivers/block/zram/zcomp.c b/drivers/block/zram/zcomp.c
index 241d3c8..f357268 100644
--- a/drivers/block/zram/zcomp.c
+++ b/drivers/block/zram/zcomp.c
@@ -103,7 +103,7 @@ void zcomp_stream_put(struct zcomp *comp)
 }
 
 int zcomp_compress(struct zcomp_strm *zstrm,
-		const unsigned char *src, unsigned int *dst_len)
+		const void *src, unsigned int *dst_len)
 {
 	/*
 	 * Our dst memory (zstrm->buffer) is always `2 * PAGE_SIZE' sized
@@ -127,8 +127,7 @@ int zcomp_compress(struct zcomp_strm *zstrm,
 }
 
 int zcomp_decompress(struct zcomp_strm *zstrm,
-		const unsigned char *src,
-		size_t src_len, unsigned char *dst)
+		const void *src, unsigned int src_len, void *dst)
 {
 	unsigned int dst_len = PAGE_SIZE;
 
diff --git a/drivers/block/zram/zcomp.h b/drivers/block/zram/zcomp.h
index 5ad1ffe..c914ab7 100644
--- a/drivers/block/zram/zcomp.h
+++ b/drivers/block/zram/zcomp.h
@@ -49,11 +49,10 @@ struct zcomp_strm *zcomp_stream_get(struct zcomp *comp);
 void zcomp_stream_put(struct zcomp *comp);
 
 int zcomp_compress(struct zcomp_strm *zstrm,
-		const unsigned char *src, unsigned int *dst_len);
+		const void *src, unsigned int *dst_len);
 
 int zcomp_decompress(struct zcomp_strm *zstrm,
-		const unsigned char *src,
-		size_t src_len, unsigned char *dst);
+		const void *src, unsigned int src_len, void *dst);
 
 bool zcomp_set_max_streams(struct zcomp *comp, int num_strm);
 #endif /* _ZCOMP_H_ */
diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
index 99c8be7..65d1403 100644
--- a/drivers/block/zram/zram_drv.c
+++ b/drivers/block/zram/zram_drv.c
@@ -563,7 +563,7 @@ static int zram_decompress_page(struct zram *zram, char *mem, u32 index)
 	unsigned char *cmem;
 	struct zram_meta *meta = zram->meta;
 	unsigned long handle;
-	size_t size;
+	unsigned int size;
 
 	bit_spin_lock(ZRAM_ACCESS, &meta->table[index].value);
 	handle = meta->table[index].handle;
-- 
2.8.3.394.g3916adf

  parent reply	other threads:[~2016-05-31 12:20 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-31 12:20 [PATCH v2 0/8] zram: switch to crypto api Sergey Senozhatsky
2016-05-31 12:20 ` [PATCH v2 1/8] zram: rename zstrm find-release functions Sergey Senozhatsky
2016-05-31 12:20 ` [PATCH v2 2/8] zram: switch to crypto compress API Sergey Senozhatsky
2016-05-31 23:40   ` Minchan Kim
2016-05-31 23:44   ` Minchan Kim
2016-06-01  1:17     ` Sergey Senozhatsky
2016-05-31 12:20 ` Sergey Senozhatsky [this message]
2016-05-31 23:48   ` [PATCH v2 3/8] zram: align zcomp interface to crypto comp API Minchan Kim
2016-06-01  1:13     ` Sergey Senozhatsky
2016-05-31 12:20 ` [PATCH v2 4/8] zram: use crypto api to check alg availability Sergey Senozhatsky
2016-06-01  0:03   ` Minchan Kim
2016-06-01  1:07     ` Sergey Senozhatsky
2016-06-01  2:27       ` Minchan Kim
2016-06-01  3:17         ` Sergey Senozhatsky
2016-06-01  6:47           ` Minchan Kim
2016-06-01  7:48             ` Sergey Senozhatsky
2016-06-01 14:59               ` Austin S. Hemmelgarn
2016-06-02  2:40               ` Minchan Kim
2016-05-31 12:20 ` [PATCH v2 5/8] zram: cosmetic: cleanup documentation Sergey Senozhatsky
2016-06-01  0:06   ` Minchan Kim
2016-05-31 12:20 ` [PATCH v2 6/8] zram: delete custom lzo/lz4 Sergey Senozhatsky
2016-06-01  0:08   ` Minchan Kim
2016-05-31 12:20 ` [PATCH v2 7/8] zram: add more compression algorithms Sergey Senozhatsky
2016-06-01  0:24   ` Minchan Kim
2016-05-31 12:20 ` [PATCH v2 8/8] zram: drop gfp_t from zcomp_strm_alloc() Sergey Senozhatsky
2016-06-01  0:41   ` Minchan Kim
2016-05-31 12:29 ` [PATCH v2 0/8] zram: switch to crypto api Sergey Senozhatsky
2016-05-31 19:07   ` Andrew Morton
2016-06-01  0:58     ` Sergey Senozhatsky

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=20160531122017.2878-4-sergey.senozhatsky@gmail.com \
    --to=sergey.senozhatsky@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=minchan@kernel.org \
    --cc=sergey.senozhatsky.work@gmail.com \
    /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

all inboxes | Powered by JetHome®