All of lore.kernel.org
 help / color / mirror / Atom feed
From: Minchan Kim <minchan@kernel.org>
To: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
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>
Subject: Re: [PATCH 3/7] zram: drop zcomp param from compress/decompress
Date: Fri, 27 May 2016 13:22:48 +0900	[thread overview]
Message-ID: <20160527042248.GC2322@bbox> (raw)
In-Reply-To: <20160525143006.1207-4-sergey.senozhatsky@gmail.com>

On Wed, May 25, 2016 at 11:30:02PM +0900, Sergey Senozhatsky wrote:
> We don't need to supply a zcomp pointer to compress/decompress
> functions, drop it.
> 
> Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
> Cc: Minchan Kim <minchan@kernel.org>
> Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>

Could you fold this patch into previous one?

> ---
>  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
> 

  reply	other threads:[~2016-05-27  4:22 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-25 14:29 [PATCH 0/7] zram: switch to crypto api Sergey Senozhatsky
2016-05-25 14:30 ` [PATCH 1/7] zram: rename zstrm find-release functions Sergey Senozhatsky
2016-05-26  0:44   ` Minchan Kim
2016-05-26  1:07     ` Sergey Senozhatsky
2016-05-25 14:30 ` [PATCH 2/7] zram: switch to crypto compress API Sergey Senozhatsky
2016-05-27  4:22   ` Minchan Kim
2016-05-27  7:59     ` Sergey Senozhatsky
2016-05-25 14:30 ` [PATCH 3/7] zram: drop zcomp param from compress/decompress Sergey Senozhatsky
2016-05-27  4:22   ` Minchan Kim [this message]
2016-05-27  7:31     ` Sergey Senozhatsky
2016-05-25 14:30 ` [PATCH 4/7] zram: align zcomp interface to crypto comp API Sergey Senozhatsky
2016-05-27  4:31   ` Minchan Kim
2016-05-27  8:00     ` Sergey Senozhatsky
2016-05-25 14:30 ` [PATCH 5/7] zram: use crypto api to check alg availability Sergey Senozhatsky
2016-05-27  4:43   ` Minchan Kim
2016-05-27  7:50     ` Sergey Senozhatsky
2016-05-27  8:27       ` Minchan Kim
2016-05-27  8:43         ` Herbert Xu
2016-05-27  9:04           ` Minchan Kim
2016-05-29  3:24             ` Sergey Senozhatsky
2016-05-30  4:47               ` Minchan Kim
2016-05-30  4:57                 ` Sergey Senozhatsky
2016-05-25 14:30 ` [PATCH 6/7] zram: delete custom lzo/lz4 Sergey Senozhatsky
2016-05-25 14:30 ` [PATCH 7/7] zram: add more compression algorithms Sergey Senozhatsky
2016-05-26  0:43 ` [PATCH 0/7] zram: switch to crypto api Joonsoo Kim
2016-05-26  1:12   ` Sergey Senozhatsky
2016-05-26  1:52     ` Joonsoo Kim
2016-05-26  0:52 ` Minchan Kim
2016-05-26  1:08   ` 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=20160527042248.GC2322@bbox \
    --to=minchan@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sergey.senozhatsky.work@gmail.com \
    --cc=sergey.senozhatsky@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.