Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751877AbbHJABm (ORCPT ); Sun, 9 Aug 2015 20:01:42 -0400 Received: from mail-pa0-f49.google.com ([209.85.220.49]:33995 "EHLO mail-pa0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751471AbbHJABk (ORCPT ); Sun, 9 Aug 2015 20:01:40 -0400 Date: Mon, 10 Aug 2015 09:02:16 +0900 From: Sergey Senozhatsky To: Salah Triki 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 Message-ID: <20150810000216.GA645@swordfish> References: <1438970802-6293-1-git-send-email-salah.triki@acm.org> <1438970802-6293-2-git-send-email-salah.triki@acm.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1438970802-6293-2-git-send-email-salah.triki@acm.org> User-Agent: Mutt/1.5.23+102 (2ca89bed6448) (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1482 Lines: 38 On (08/07/15 19:06), Salah Triki wrote: > Date: Fri, 7 Aug 2015 19:06:42 +0100 > From: Salah Triki > 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 > --- > 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/