Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp2356897pxy; Tue, 3 Aug 2021 04:37:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw2fpzuPkPr1cgS6izOwxKqVUjAypMkWzb0wtiJ3mMc1RVUuJqUArtaaUuCP4IaWHN32Sxu X-Received: by 2002:a05:6402:28a0:: with SMTP id eg32mr17414019edb.203.1627990677320; Tue, 03 Aug 2021 04:37:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627990677; cv=none; d=google.com; s=arc-20160816; b=0wQjad6j38NEPNnVvI0X/jswW2+4INYpVeM8YKyMsVufHtNlV7b6PA8YtZ7N15dLjc oNqkf50DE3hLHMQnBSSbL43+iKsL5VAbiNzPCi/M/QpY5oPkuavrsHVF9eM0beT9WwQ9 nKAENA7132dm0YLvEdrW4InLbKr0q8RfhbVUd2xvoVFiEZzEDE/xhmh/kLESGYZFaa6x DGkLD4esYYNUjfYLSjUjZ/wo/OQhkN+dJRs2gwpipQvxzpTQACvtabuWQuksYykVD2aZ jXPj6E2573XnizsrXLxXHK6DYNh8IAYY85kVP3oluvsEX1/hsNLxTUuzOpFkiaensPL8 kDlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:feedback-id:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from; bh=ihffM4r8KuEH7GCVlgFWyKiKITDIt2RelpRUnmnpZ5A=; b=YwwW5sTId8ji4Mtp/wvvpl5y/fc1snHAUX0tOvH/cHfhsFGyaruSerq7A9mAnMgWT9 YXpYPK+lWT6MItu8QP/ewmQVSe3I5y5FnfueB46YTe12KdTxiClDcICsXJZa3vBIHSK8 /t5cJ8gBrKFU4qDC4e1vwryQ2rejFbUQuJO67Eu1JRV/30O8M1swzI4+dKdukGXwz8vC RDvrxHL+bvI3cPiB8V1Isp2Y6ziO2Prxg4kbkewe27xgcJmQ2lgoqbvNhBHxSux7bmTK 5Ln5s1qkmZVOJFqbhpRLz0bvZNfhie+Cv7W/F6qlez7nm/B81nzU8nZuXfqG2e7s38MN PtmA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y13si12702358edr.600.2021.08.03.04.37.34; Tue, 03 Aug 2021 04:37:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235674AbhHCLeT (ORCPT + 99 others); Tue, 3 Aug 2021 07:34:19 -0400 Received: from smtpbg126.qq.com ([106.55.201.22]:18484 "EHLO smtpbg587.qq.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S235585AbhHCLeH (ORCPT ); Tue, 3 Aug 2021 07:34:07 -0400 X-QQ-mid: bizesmtp31t1627990388t2abq2ne Received: from localhost.localdomain (unknown [125.69.40.136]) by esmtp6.qq.com (ESMTP) with id ; Tue, 03 Aug 2021 19:33:06 +0800 (CST) X-QQ-SSF: 01000000002000B0C000B00A0000000 X-QQ-FEAT: Z5h1lUobohN49qzZbbMeBpA+48lSsb2ie4jDewwC0Q6haqCO/fLnfwdbC9xzI JEmROSAQGCWXXHPSE04hn1piq0qxYpJzfnLewb4U6sLoWpsqtGt7xK17JPKEPZZhQsmzABY s6Ug0sXiZcimD/QRJ2feu5vEyGcrz6OtGjCbZqzrgWt/pXwQF7ZxsbnPKHTOYuR5V9eL9Xn 9PkGoOHO8HSEsAn2wEubqSUgTFZgVenjOqsc/fEz7UK3SoT15bxGAn6b6M8TMB6z7Eofbuz jQ8+/lSgmc/3GuiIN8pjGCgpRcGasr2z5C2yviYANQsVjHiGdxuux4SzgjSriBMc88iw== X-QQ-GoodBg: 0 From: Jason Wang To: miquel.raynal@bootlin.com Cc: liang.yang@amlogic.com, vigneshr@ti.com, narmstrong@baylibre.com, khilman@baylibre.com, richard@nod.at, jbrunet@baylibre.com, martin.blumenstingl@googlemail.com, linux-mtd@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, Jason Wang Subject: [PATCH] mtd: rawnand: remove never changed ret variable Date: Tue, 3 Aug 2021 19:33:00 +0800 Message-Id: <20210803113300.24230-1-wangborong@cdjrlc.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:cdjrlc.com:qybgspam:qybgspam2 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The ret variable used for returning value in the function `meson_nfc_rw_cmd_prepare_and_execute` is never change after initialising. Therefore, we can remove it safely and return 0 at the end of the function. Signed-off-by: Jason Wang --- drivers/mtd/nand/raw/meson_nand.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mtd/nand/raw/meson_nand.c b/drivers/mtd/nand/raw/meson_nand.c index 817bddccb775..ac3be92872d0 100644 --- a/drivers/mtd/nand/raw/meson_nand.c +++ b/drivers/mtd/nand/raw/meson_nand.c @@ -580,7 +580,7 @@ static int meson_nfc_rw_cmd_prepare_and_execute(struct nand_chip *nand, u32 *addrs = nfc->cmdfifo.rw.addrs; u32 cs = nfc->param.chip_select; u32 cmd0, cmd_num, row_start; - int ret = 0, i; + int i; cmd_num = sizeof(struct nand_rw_cmd) / sizeof(int); @@ -620,7 +620,7 @@ static int meson_nfc_rw_cmd_prepare_and_execute(struct nand_chip *nand, meson_nfc_cmd_idle(nfc, nfc->timing.tadl); } - return ret; + return 0; } static int meson_nfc_write_page_sub(struct nand_chip *nand, -- 2.32.0