Received: by 10.223.176.46 with SMTP id f43csp673846wra; Fri, 19 Jan 2018 00:02:32 -0800 (PST) X-Google-Smtp-Source: ACJfBouy+OwlqAIUEVFMWtdlhrI8hQ3EjB7OSD8a1le+GppcEQ02LcNmzWOwSGWqxY8dJUneqtIT X-Received: by 2002:a17:902:8544:: with SMTP id d4-v6mr1188992plo.167.1516348951966; Fri, 19 Jan 2018 00:02:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516348951; cv=none; d=google.com; s=arc-20160816; b=G+Sic4lwKzYyt9cPudk2L8fZPmplPJZaatdfrSUXhbCMIV5m7KpPpBrz45E8NWd1D8 6Y+fyj52CQ8JIeVwIzFpULk46M3UgyGueIip9NDCZsKubC3UWy9OXfnGoeykb6OwJwEj XF4NJgU4JDh49X1XUIOp01Tw56PYQXlTqXVN8C9pVLLMAud9tKkwsz5eAH0uLdv646iA nAl4QBVyRziV+cNfFtFkO4yAIi+j7vk1tzKKfIxyNior409JJHlhOVuc8JAQH7AeMsZ+ jDQbR4VcQHja6yLdCIaLiXEl53iwH4wduYxqbxFEdIvyqLSZuYpC41WW8yNrI//9UG8k Fkcw== 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 :message-id:date:subject:cc:to:from:arc-authentication-results; bh=UV2TYkc3J8BlZ+3NjziQ5aE0DJGV8ShvoZLbxvOs1wY=; b=H8R8ZWCuJer6r92yYxaZiiq3+od4MKdUc6rL5+KvImcW62Oa9hwfJFd7TfpIP+HjXS /udcAyfCpRGSTX9VpfC02viKco99NxxIw4y422gGUlSVN9U2RA9OxXCYFd6PRknzpQy5 C3hCND1EIqenMO/LlXXc8TcS0wydT3RbWKig6U9/rpm0dg+KIEcMLZI+IciOierFCAVE vODFcTUx5gvDVGYDI9CoY980sVIpCWPDM65Qp30s3IVFJRJsvgeKRibcjvSyDVFeOZsa UPhtXsf7ZOktxdZwmmltNt2G6Q0WrRRFFY0rJHMzvKDXn6FzjviPI3GQpLgTGuNd+Act OqNQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 68si8726889pfx.384.2018.01.19.00.02.17; Fri, 19 Jan 2018 00:02:31 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754872AbeASIAQ (ORCPT + 99 others); Fri, 19 Jan 2018 03:00:16 -0500 Received: from youngberry.canonical.com ([91.189.89.112]:43604 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754809AbeASIAI (ORCPT ); Fri, 19 Jan 2018 03:00:08 -0500 Received: from cpc104638-craw9-2-0-cust581.16-3.cable.virginm.net ([82.33.66.70] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1ecRac-0006Jp-Nl; Fri, 19 Jan 2018 07:59:54 +0000 From: Colin King To: Miquel Raynal , Boris Brezillon , Richard Weinberger , David Woodhouse , Brian Norris , Marek Vasut , Cyrille Pitchen , linux-mtd@lists.infradead.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH][V2] mtd: nand: marvell: remove redundant variable 'oob_len' Date: Fri, 19 Jan 2018 07:59:54 +0000 Message-Id: <20180119075954.15009-1-colin.king@canonical.com> X-Mailer: git-send-email 2.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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 */ -- 2.15.1