From patchwork Tue Jan 16 12:57:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin Ian King X-Patchwork-Id: 861493 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=65.50.211.133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="YQYFC5Qp"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zLVdX3Pjvz9s7n for ; Tue, 16 Jan 2018 23:58:24 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=7+eS3qwesc2Me5Hp/fk2lEgcI4z+TqIyZRB5aq7AF8U=; b=YQYFC5QpGskY/i q7rV8TK0jhrKYj+mpk8GpTfiztrO2EB6LrWf0euC/t0ebjwtonSDvWuAVMt7yY9Jk5K77gjfOVl1g fTz9b7Ze0BUJ6j+L6cAqQRWRDMWW/NhKWQ222y9z7GpraFwudVnly2rcVDyFYBVkoQBQGX4EV7mCZ qulF4xzXthaalSjm53B4YUX5c6I/k1AqEBNOAFzEznbA6hxI1sbLGhy/sRmwKMSQOcECxMz1Igp0g D+O3pzq4DCt6lc0EOeJQcc0IU0qdtYAxaB02cdbkQ/uno+CmX0xtuER6tw8/q2ayE2SptqJ9Oo4FX UTQBx9glgXjRImD8hFlg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1ebQol-0008Is-Rq; Tue, 16 Jan 2018 12:58:19 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1ebQod-0008HU-EQ for linux-mtd@lists.infradead.org; Tue, 16 Jan 2018 12:58:17 +0000 Received: from 1.general.cking.uk.vpn ([10.172.193.212] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1ebQoG-00068o-RX; Tue, 16 Jan 2018 12:57:48 +0000 From: Colin King To: Miquel Raynal , Boris Brezillon , Richard Weinberger , David Woodhouse , Brian Norris , Marek Vasut , Cyrille Pitchen , linux-mtd@lists.infradead.org Subject: [PATCH][next] mtd: nand: remove redundant variable 'oob_len' Date: Tue, 16 Jan 2018 12:57:48 +0000 Message-Id: <20180116125748.26042-1-colin.king@canonical.com> X-Mailer: git-send-email 2.15.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180116_045811_627234_CE5426D1 X-CRM114-Status: UNSURE ( 7.95 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -6.9 (------) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-6.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [91.189.89.112 listed in list.dnswl.org] -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kernel-janitors@vger.kernel.org Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org 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 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 */