Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1410254 > unrolled thread

[PATCH v2 3/8] zram: align zcomp interface to crypto comp API

Started bySergey Senozhatsky <sergey.senozhatsky@gmail.com>
First post2016-05-31 14:30 +0200
Last post2016-06-01 03:20 +0200
Articles 3 — 3 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH v2 3/8] zram: align zcomp interface to crypto comp API Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2016-05-31 14:30 +0200
    Re: [PATCH v2 3/8] zram: align zcomp interface to crypto comp API Minchan Kim <minchan@kernel.org> - 2016-06-01 01:50 +0200
      Re: [PATCH v2 3/8] zram: align zcomp interface to crypto comp API Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2016-06-01 03:20 +0200

#1410254 — [PATCH v2 3/8] zram: align zcomp interface to crypto comp API

FromSergey Senozhatsky <sergey.senozhatsky@gmail.com>
Date2016-05-31 14:30 +0200
Subject[PATCH v2 3/8] zram: align zcomp interface to crypto comp API
Message-ID<rEQY3-2DM-35@gated-at.bofh.it>
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

[toc] | [next] | [standalone]


#1410691

FromMinchan Kim <minchan@kernel.org>
Date2016-06-01 01:50 +0200
Message-ID<rF1A5-H3-1@gated-at.bofh.it>
In reply to#1410254
On Tue, May 31, 2016 at 09:20:12PM +0900, Sergey Senozhatsky wrote:
> 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>

Acked-by: Minchan Kim <minchan@kernel.org>

Aha, you changed src_len in this patchset. :)

[toc] | [prev] | [next] | [standalone]


#1410718

FromSergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
Date2016-06-01 03:20 +0200
Message-ID<rF2Zb-1G2-3@gated-at.bofh.it>
In reply to#1410691
On (06/01/16 08:48), Minchan Kim wrote:
> On Tue, May 31, 2016 at 09:20:12PM +0900, Sergey Senozhatsky wrote:
> > 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>
> 
> Acked-by: Minchan Kim <minchan@kernel.org>
> 
> Aha, you changed src_len in this patchset. :)

oh, thanks.

hmm... I didn't want to add `cosmetic noise' to the 0002, but
probably 0003 better be part of 0002. the patch is not so big
so it won't complicate 0002 a lot. I'll ask Andrew to squash,
or will squash on my side and resend the whole series.

	-ss

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web