From patchwork Tue Mar 7 02:46:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Qiu X-Patchwork-Id: 65209 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp2208475wrd; Mon, 6 Mar 2023 19:04:19 -0800 (PST) X-Google-Smtp-Source: AK7set+XrikzVs7BwgoMGZS8qpfzX4TGdW6UG9PmhboAJxXCfEWhKDqGIxT8gsCfSzLni6QwiiLC X-Received: by 2002:a62:3001:0:b0:5a8:d987:d012 with SMTP id w1-20020a623001000000b005a8d987d012mr10666069pfw.11.1678158258748; Mon, 06 Mar 2023 19:04:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678158258; cv=none; d=google.com; s=arc-20160816; b=z0JNRsP1wiZzD/CqF+zzM2Ak93sOop3gL3c3VYB7mbgGO6c3t82VcreI0tQ7mq3rtS VgKwnUX1tdUk7Bo67NrIZxK3FqEOAS+gchqzuxwedvRk9plKEjtuWnEDCd6mgRAqMsON nRsB1oqt8yuO0kYuFsW5ZORl14vGQYNrutWGBZp4cgjPsFl1VJi9endlbn0kmF7Uy4TQ ubk+yuTRTE6mzgwi5r3dwUyVJLhKv+SnEgC/M151/d77l07hDyWZvy0cKOmFCOSxw+Yl E3SXm4hxuThoW78QlfFyUC+vEcTtFxBI9rkenuKmBr+FW3o6POz+VFAK4PmC9DAVUyWB HdSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=jCCcuYzeW1O6inmr5nM3+ljybE5AxvUPgKB9CxjMvhI=; b=tUaUfzhnVZNAymumAZtJpKcYIJy8cjEfjDqJCDy5hMSUj5wYJ/nZ886uuBtPOUoR+O 6kMWnSCLrDkmqy4BCviR+hyCIWsd3YtnqhM52pb5I5uARKX4AaYHG16dn9YVu8A53uh+ /DRLhp1Z0wxNc702CWawFvCwFBf8KiaLBQajrSEQcaGOXOZncn3f8iromqBIFmm/ceQF 6/ZdZLOHj2Gc1eec2ZmiQme3flLlwoJezpGplRJ7t/ed7FI4ZIhyCgfYnOd6ajDMN25p fkAgzRt/BMtepfdkG7oObuz4/rfkQ0wk9f/jKYXDNL+50ORohHwLhyKz8+8dEKaxOdA6 WEsg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t1-20020a63eb01000000b00502f2846ad0si10817002pgh.840.2023.03.06.19.04.04; Mon, 06 Mar 2023 19:04:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230119AbjCGCqy convert rfc822-to-8bit (ORCPT + 99 others); Mon, 6 Mar 2023 21:46:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49868 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229605AbjCGCqx (ORCPT ); Mon, 6 Mar 2023 21:46:53 -0500 Received: from fd01.gateway.ufhost.com (fd01.gateway.ufhost.com [61.152.239.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D56FA69059; Mon, 6 Mar 2023 18:46:51 -0800 (PST) Received: from EXMBX165.cuchost.com (unknown [175.102.18.54]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "EXMBX165", Issuer "EXMBX165" (not verified)) by fd01.gateway.ufhost.com (Postfix) with ESMTP id 6419824E287; Tue, 7 Mar 2023 10:46:49 +0800 (CST) Received: from EXMBX068.cuchost.com (172.16.6.68) by EXMBX165.cuchost.com (172.16.6.75) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Tue, 7 Mar 2023 10:46:49 +0800 Received: from williamqiu-virtual-machine.starfivetech.com (171.223.208.138) by EXMBX068.cuchost.com (172.16.6.68) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Tue, 7 Mar 2023 10:46:48 +0800 From: William Qiu To: , , CC: Rob Herring , Krzysztof Kozlowski , Jaehoon Chung , Ulf Hansson , William Qiu , Conor Dooley , Subject: [PATCH v5 2/2] mmc: starfive: Add initialization of prev_err Date: Tue, 7 Mar 2023 10:46:46 +0800 Message-ID: <20230307024646.10216-3-william.qiu@starfivetech.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230307024646.10216-1-william.qiu@starfivetech.com> References: <20230307024646.10216-1-william.qiu@starfivetech.com> MIME-Version: 1.0 X-Originating-IP: [171.223.208.138] X-ClientProxiedBy: EXCAS066.cuchost.com (172.16.6.26) To EXMBX068.cuchost.com (172.16.6.68) X-YovoleRuleAgent: yovoleflag X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_MSPIKE_H2, SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759676474335007961?= X-GMAIL-MSGID: =?utf-8?q?1759676474335007961?= Add a incremental updates to fix a bug that prev_err is uninitialized. Signed-off-by: William Qiu Reported-by: Dan Carpenter Reviewed-by: Emil Renner Berthing --- drivers/mmc/host/dw_mmc-starfive.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/host/dw_mmc-starfive.c b/drivers/mmc/host/dw_mmc-starfive.c index 40f5969b07a6..dab1508bf83c 100644 --- a/drivers/mmc/host/dw_mmc-starfive.c +++ b/drivers/mmc/host/dw_mmc-starfive.c @@ -51,7 +51,7 @@ static int dw_mci_starfive_execute_tuning(struct dw_mci_slot *slot, struct dw_mci *host = slot->host; struct starfive_priv *priv = host->priv; int rise_point = -1, fall_point = -1; - int err, prev_err; + int err, prev_err = 0; int i; bool found = 0; u32 regval;