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


Groups > linux.kernel > #1202969 > unrolled thread

[PATCH V3 0/1] zram: Remove useless check

Started bySalah Triki <salah.triki@acm.org>
First post2015-08-07 20:10 +0200
Last post2015-08-10 02:10 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH V3 0/1] zram: Remove useless check Salah Triki <salah.triki@acm.org> - 2015-08-07 20:10 +0200
    [PATCH V3 1/1] zram: Remove useless check Salah Triki <salah.triki@acm.org> - 2015-08-07 20:10 +0200
      Re: [PATCH V3 1/1] zram: Remove useless check Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2015-08-10 02:10 +0200

#1202969 — [PATCH V3 0/1] zram: Remove useless check

FromSalah Triki <salah.triki@acm.org>
Date2015-08-07 20:10 +0200
Subject[PATCH V3 0/1] zram: Remove useless check
Message-ID<pUUfE-7bJ-27@gated-at.bofh.it>
The previous versions of this patch contain spelling errors and cryptic messages, please ignore them. The patch removes the check of the return value of lzo1x_1_compress, since it returns always LZO_E_OK.

Salah Triki (1):
  zram: Remove useless check

 drivers/block/zram/zcomp_lzo.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1202971 — [PATCH V3 1/1] zram: Remove useless check

FromSalah Triki <salah.triki@acm.org>
Date2015-08-07 20:10 +0200
Subject[PATCH V3 1/1] zram: Remove useless check
Message-ID<pUUfF-7bJ-37@gated-at.bofh.it>
In reply to#1202969
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);
 }
 
 static int lzo_decompress(const unsigned char *src, size_t src_len,
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

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


#1203711 — Re: [PATCH V3 1/1] zram: Remove useless check

FromSergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
Date2015-08-10 02:10 +0200
SubjectRe: [PATCH V3 1/1] zram: Remove useless check
Message-ID<pVIP7-50T-9@gated-at.bofh.it>
In reply to#1202971
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web