From: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
To: Salah Triki <salah.triki@acm.org>
Cc: minchan@kernel.org, ngupta@vflare.org,
sergey.senozhatsky.work@gmail.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH V3 1/1] zram: Remove useless check
Date: Mon, 10 Aug 2015 09:02:16 +0900 [thread overview]
Message-ID: <20150810000216.GA645@swordfish> (raw)
In-Reply-To: <1438970802-6293-2-git-send-email-salah.triki@acm.org>
On (08/07/15 19:06), Salah Triki wrote:
> Date: Fri, 7 Aug 2015 19:06:42 +0100
> From: Salah Triki <salah.triki@acm.org>
> To: minchan@kernel.org, ngupta@vflare.org, sergey.senozhatsky.work@gmail.com
> Cc: salah.triki@acm.org, linux-kernel@vger.kernel.org
> Subject: [PATCH V3 1/1] zram: Remove useless check
> X-Mailer: git-send-email 1.9.1
>
> lzo1x_1_compress always returns LZO_E_OK that is equal to 0. Thus, the
> check of the return value is useless.
>
> Signed-off-by: Salah Triki <salah.triki@acm.org>
> ---
> drivers/block/zram/zcomp_lzo.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/block/zram/zcomp_lzo.c b/drivers/block/zram/zcomp_lzo.c
> index da1bc47..3cf30c9 100644
> --- a/drivers/block/zram/zcomp_lzo.c
> +++ b/drivers/block/zram/zcomp_lzo.c
> @@ -26,8 +26,7 @@ static void lzo_destroy(void *private)
> static int lzo_compress(const unsigned char *src, unsigned char *dst,
> size_t *dst_len, void *private)
> {
> - int ret = lzo1x_1_compress(src, PAGE_SIZE, dst, dst_len, private);
> - return ret == LZO_E_OK ? 0 : ret;
> + return lzo1x_1_compress(src, PAGE_SIZE, dst, dst_len, private);
> }
NACK. it may change someday, we don't control it.
the check must stay.
-ss
prev parent reply other threads:[~2015-08-10 0:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-07 18:06 [PATCH V3 0/1] zram: Remove useless check Salah Triki
2015-08-07 18:06 ` [PATCH V3 1/1] " Salah Triki
2015-08-10 0:02 ` Sergey Senozhatsky [this message]
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=20150810000216.GA645@swordfish \
--to=sergey.senozhatsky.work@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=minchan@kernel.org \
--cc=ngupta@vflare.org \
--cc=salah.triki@acm.org \
/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