Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp3762639pxu; Tue, 8 Dec 2020 23:02:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJxGEoZaVK/pK2Qbd2ufU5JkDkLjefNMRFDUo5Y1qc1LKk40AouCFzXIjDCujuHh9SNr9ckV X-Received: by 2002:a17:906:f1cc:: with SMTP id gx12mr861765ejb.164.1607497356869; Tue, 08 Dec 2020 23:02:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607497356; cv=none; d=google.com; s=arc-20160816; b=YZC8H257CtXFz5KSYfuK84LboemttzKBGTOODAI2KpiXHeIiBCnQjzghpWa7qMUjER ZpW0wESeyyI2GsOfRNwXS2vgjtZseMf5xiVceccpQOqQwuvZzD1SnZ7SPEgW54cT0akZ ufDrBftS9F94oilGNIjpZ8zpUdpb+CUN0dWB2PI/kz7BzJsNsbJaTl3IOD0Uf7vg6eDn gn2h+T4+h2pnTLHmXjHOteR6p8A+EsU3hdjJwH9hwXO7lVaeCA8ciq6iQLDShM92FrMT EUF+rYaqyhirQnOSbaJqwqm23siPPb3hTFflbXxT95TBppX9+wjyHCWA0Eo9gzOaBj/A hVwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:ironport-sdr; bh=VM3/MY4snBTtpkcdyCF/RtLc8W8bkiaZMstWUFgYwNo=; b=YhgWZsAbO4KI5A7v1cshrbttUCOPczJSQJui2ZF9LtRUUGIqgbrt7sugKB2xc1+m6b aFjsKJmk5Ig6FMG0+rf0LnDIlKJvcFnapoxGrXZq7ZmZFTJk1GZtvPTBacFczUr+Vqou 1PLdhfKNpAhS5XNh06nhFR2K04VxuhVO1q/HeFWL6TKPBKoaLFzezSnSBVl+2YtPB6Mf VHwnmV3p0Rag3FmaEzl4jFa8G9Bcjt1tEWYd9//XGcg7G7ioMjfODSIGZkvcTueBvvzQ 7XHRAHQT1Xu1GwID4PbjQwDTcIBA1oKKiwN42/q1onKL413RmKIM7fK2UZ4wKsPtjop3 Hpyg== 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 cq5si378380edb.200.2020.12.08.23.02.14; Tue, 08 Dec 2020 23:02:36 -0800 (PST) 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 S1728330AbgLIG7Y (ORCPT + 99 others); Wed, 9 Dec 2020 01:59:24 -0500 Received: from labrats.qualcomm.com ([199.106.110.90]:5506 "EHLO labrats.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728329AbgLIG7V (ORCPT ); Wed, 9 Dec 2020 01:59:21 -0500 IronPort-SDR: 1xi+2kSz3668aA4wquqQLQsSMXQPGteHr0enzHMcvsBEGq7GiH0d33qYQ7PEn2ipcjqZ9ZaeFo cfX3CV1l457iYc8hjTgNIWVkWGm0y2yhc6Nu0NHr8R/RZmdNb3YcMIkGjhKFRvxrN3VzzdrQHJ YGpKVnF0mXycvWPskXDjTCxKS6u51xzsY7sROfn3qB/4ZK7d0lRhn2DjwK0vFEVsiJny4A9qV6 V5F5yoobTx7X/HitMxdItWZVcR/PoZjH4bNWoHnAkfGkeJyWTVymxmGdke7Dv1R80qZrS8f0BE FUs= X-IronPort-AV: E=Sophos;i="5.78,404,1599548400"; d="scan'208";a="47568894" Received: from unknown (HELO ironmsg-SD-alpha.qualcomm.com) ([10.53.140.30]) by labrats.qualcomm.com with ESMTP; 08 Dec 2020 22:58:32 -0800 X-QCInternal: smtphost Received: from stor-presley.qualcomm.com ([192.168.140.85]) by ironmsg-SD-alpha.qualcomm.com with ESMTP; 08 Dec 2020 22:58:31 -0800 Received: by stor-presley.qualcomm.com (Postfix, from userid 359480) id CB682212AC; Tue, 8 Dec 2020 22:58:31 -0800 (PST) From: Can Guo To: asutoshd@codeaurora.org, nguyenb@codeaurora.org, hongwus@codeaurora.org, rnayak@codeaurora.org, linux-scsi@vger.kernel.org, kernel-team@android.com, saravanak@google.com, salyzyn@google.com, cang@codeaurora.org Cc: Alim Akhtar , Avri Altman , "James E.J. Bottomley" , "Martin K. Petersen" , Stanley Chu , Bean Huo , Bart Van Assche , linux-kernel@vger.kernel.org (open list) Subject: [PATCH v1 2/2] scsi: ufs: Clean up some lines from ufshcd_hba_exit() Date: Tue, 8 Dec 2020 22:58:20 -0800 Message-Id: <1607497100-27570-3-git-send-email-cang@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1607497100-27570-1-git-send-email-cang@codeaurora.org> References: <1607497100-27570-1-git-send-email-cang@codeaurora.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ufshcd_hba_exit() is always called after ufshcd_exit_clk_scaling() and ufshcd_exit_clk_gating(), so no need to suspend clock scaling again in ufshcd_hba_exit(). Signed-off-by: Can Guo --- drivers/scsi/ufs/ufshcd.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 12266bd..0a5b197 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -7765,6 +7765,7 @@ static void ufshcd_async_scan(void *data, async_cookie_t cookie) if (ret) { pm_runtime_put_sync(hba->dev); ufshcd_exit_clk_scaling(hba); + ufshcd_exit_clk_gating(hba); ufshcd_hba_exit(hba); } } @@ -8203,10 +8204,6 @@ static void ufshcd_hba_exit(struct ufs_hba *hba) if (hba->is_powered) { ufshcd_variant_hba_exit(hba); ufshcd_setup_vreg(hba, false); - ufshcd_suspend_clkscaling(hba); - if (ufshcd_is_clkscaling_supported(hba)) - if (hba->devfreq) - ufshcd_suspend_clkscaling(hba); ufshcd_setup_clocks(hba, false); ufshcd_setup_hba_vreg(hba, false); hba->is_powered = false; -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.