Received: by 10.223.176.46 with SMTP id f43csp835713wra; Sat, 20 Jan 2018 05:53:05 -0800 (PST) X-Google-Smtp-Source: AH8x227Wd3z32e3f1dgwahBM300s6JROHa/qTQhoMOP2XfXByiQKGSJZ5iSqaqUsMav2ankicyuP X-Received: by 10.101.102.73 with SMTP id z9mr2010111pgv.448.1516456385007; Sat, 20 Jan 2018 05:53:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516456384; cv=none; d=google.com; s=arc-20160816; b=CGngphtcnk4/qDRH8Je2WYDj4LIR1W6zhKpQ6Fo47Y7XHPcN/mrtvF7sJ1w1/Kxn9q T/JaT3IKIpUhUlzVc0uqbHfoSI0YPd+H6LiA4iyITual1O3N/XE7pzs7QaDPfeBlKCue jo15n0cvazWaI+sVFtRl1fD4NNsLB58KcU6OBXn1hK5YJ7pXQeSFyP+cWoKNsPR5mQ7k IInIKJ1iwkE785n9cO8nGgit0zslAB/rQqr+BZxyz0eGz+lVLt4d3bOIf14GDXoFnExq tk9HsxqBZEbCvV5AtJfRUoBXg9KU6CK8TtDbW/gTjPx8kT3+vT9OpTJReHRgh3HdiBlL 5Jyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :arc-authentication-results; bh=st/rBmfCdpRFIXlF5gG13f8NozdvIjX35lEmxlmu7ls=; b=0qm00hdN/mQ9UonqiIlPFAZOi23kFJeWjR7XAAIxCxITVRumm9w+nrvHzE8GAvESbI iDl/Xt1DM8PUoVWNs1YAA0QZdKvwB1zSvtVvaRJiYQ/dZKkaJJwg8JpMK/GSI1mo0iI3 vHUmXVxojA7boBg4uBV2pRrK+FzpwVvfELGUrgKgHWiO4UEnlCKmKclL++HaZSH0ujHq pwcwjL+dYxONZ/BBoSZuhfiH8Aw5wiKf5mNeD4FpxrQjbrrS99w/DavR5I4UGTkkI5HL 6A/JBsXNxbVseBC44AbClKoDHAu68hOu+8skGef/whP/pshODbjgCzpQbi1cbwJSloZd SdFQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b34-v6si1727262plc.54.2018.01.20.05.52.51; Sat, 20 Jan 2018 05:53:04 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754653AbeATNwX (ORCPT + 99 others); Sat, 20 Jan 2018 08:52:23 -0500 Received: from mail.free-electrons.com ([62.4.15.54]:56944 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751130AbeATNwT (ORCPT ); Sat, 20 Jan 2018 08:52:19 -0500 Received: by mail.free-electrons.com (Postfix, from userid 110) id A35A3208F0; Sat, 20 Jan 2018 14:52:18 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.free-electrons.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0 Received: from bbrezillon (unknown [91.160.177.164]) by mail.free-electrons.com (Postfix) with ESMTPSA id 61F4020879; Sat, 20 Jan 2018 14:52:18 +0100 (CET) Date: Sat, 20 Jan 2018 14:52:17 +0100 From: Boris Brezillon To: Colin King Cc: Miquel Raynal , Richard Weinberger , David Woodhouse , Brian Norris , Marek Vasut , Cyrille Pitchen , linux-mtd@lists.infradead.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH][V2] mtd: nand: marvell: remove redundant variable 'oob_len' Message-ID: <20180120145217.368504bb@bbrezillon> In-Reply-To: <20180119075954.15009-1-colin.king@canonical.com> References: <20180119075954.15009-1-colin.king@canonical.com> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 19 Jan 2018 07:59:54 +0000 Colin King wrote: > From: Colin Ian King > > Variable oob_len is assigned and never read, hence it is redundant and > can be removed. > > Cleans up clang warnings: > > drivers/mtd/nand/marvell_nand.c:1356:6: warning: Value stored to 'oob_len' > during its initialization is never read > drivers/mtd/nand/marvell_nand.c:1369:4: warning: Value stored to 'oob_len' > is never read > Applied. Thanks, Boris > Signed-off-by: Colin Ian King > --- > drivers/mtd/nand/marvell_nand.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/drivers/mtd/nand/marvell_nand.c b/drivers/mtd/nand/marvell_nand.c > index 4bd53b360277..f15ab37edf4e 100644 > --- a/drivers/mtd/nand/marvell_nand.c > +++ b/drivers/mtd/nand/marvell_nand.c > @@ -1353,7 +1353,6 @@ static int marvell_nfc_hw_ecc_bch_write_page_raw(struct mtd_info *mtd, > int data_len = lt->data_bytes; > int spare_len = lt->spare_bytes; > int ecc_len = lt->ecc_bytes; > - int oob_len = spare_len + ecc_len; > int spare_offset = 0; > int ecc_offset = (lt->full_chunk_cnt * lt->spare_bytes) + > lt->last_spare_bytes; > @@ -1366,7 +1365,6 @@ static int marvell_nfc_hw_ecc_bch_write_page_raw(struct mtd_info *mtd, > data_len = lt->last_data_bytes; > spare_len = lt->last_spare_bytes; > ecc_len = lt->last_ecc_bytes; > - oob_len = spare_len + ecc_len; > } > > /* Point to the column of the next chunk */