From patchwork Thu Feb 6 06:56:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Can Guo X-Patchwork-Id: 11367705 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E89FA14E3 for ; Thu, 6 Feb 2020 06:57:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C75F221741 for ; Thu, 6 Feb 2020 06:57:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="key not found in DNS" (0-bit key) header.d=mg.codeaurora.org header.i=@mg.codeaurora.org header.b="QreR6HXJ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727987AbgBFG5U (ORCPT ); Thu, 6 Feb 2020 01:57:20 -0500 Received: from mail25.static.mailgun.info ([104.130.122.25]:36447 "EHLO mail25.static.mailgun.info" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727945AbgBFG5U (ORCPT ); Thu, 6 Feb 2020 01:57:20 -0500 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1580972239; h=References: In-Reply-To: Message-Id: Date: Subject: Cc: To: From: Sender; bh=z63XLiUfSg/rY+QkoqBT8YXmQRcZrkXaBkpAmhgjVyY=; b=QreR6HXJiuo57H4/Jns/UpqCgJBsrDrxHU7+pLfVVjL80TeP1zROjfrGamzmef9N5Zd7blBf T5oE9n4UixH0KHZeO9y0WwNH8ipq4TOvhfOeUd5elO8QBRrxtRtyp/2BIX7YzGuoeAseNSPB 92RC3Uf5ctjdcikQu9H6VVul9iM= X-Mailgun-Sending-Ip: 104.130.122.25 X-Mailgun-Sid: WyJlNmU5NiIsICJsaW51eC1zY3NpQHZnZXIua2VybmVsLm9yZyIsICJiZTllNGEiXQ== Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by mxa.mailgun.org with ESMTP id 5e3bb8cb.7fa49028b148-smtp-out-n03; Thu, 06 Feb 2020 06:57:15 -0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 03FF4C447A3; Thu, 6 Feb 2020 06:57:12 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=2.0 tests=ALL_TRUSTED,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.0 Received: from pacamara-linux.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: cang) by smtp.codeaurora.org (Postfix) with ESMTPSA id 330FDC43383; Thu, 6 Feb 2020 06:57:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 330FDC43383 Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=none smtp.mailfrom=cang@codeaurora.org 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" , Matthias Brugger , Bean Huo , Stanley Chu , Bart Van Assche , Venkat Gopalakrishnan , Tomas Winkler , linux-kernel@vger.kernel.org (open list), linux-arm-kernel@lists.infradead.org (moderated list:ARM/Mediatek SoC support), linux-mediatek@lists.infradead.org (moderated list:ARM/Mediatek SoC support) Subject: [PATCH 3/8] scsi: ufs: Remove the check before call setup clock notify vops Date: Wed, 5 Feb 2020 22:56:46 -0800 Message-Id: <1580972212-29881-4-git-send-email-cang@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1580972212-29881-1-git-send-email-cang@codeaurora.org> References: <1580972212-29881-1-git-send-email-cang@codeaurora.org> Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org The functionality of vendor specific ops should be handled properly in platform specific driver, but should not count on the UFS driver. Signed-off-by: Can Guo Reviewed-by: Bean Huo Reviewed-by: Stanley Chu diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 83ae093..bbc2607 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -7402,16 +7402,9 @@ static int __ufshcd_setup_clocks(struct ufs_hba *hba, bool on, if (list_empty(head)) goto out; - /* - * vendor specific setup_clocks ops may depend on clocks managed by - * this standard driver hence call the vendor specific setup_clocks - * before disabling the clocks managed here. - */ - if (!on) { - ret = ufshcd_vops_setup_clocks(hba, on, PRE_CHANGE); - if (ret) - return ret; - } + ret = ufshcd_vops_setup_clocks(hba, on, PRE_CHANGE); + if (ret) + return ret; list_for_each_entry(clki, head, list) { if (!IS_ERR_OR_NULL(clki->clk)) { @@ -7435,16 +7428,9 @@ static int __ufshcd_setup_clocks(struct ufs_hba *hba, bool on, } } - /* - * vendor specific setup_clocks ops may depend on clocks managed by - * this standard driver hence call the vendor specific setup_clocks - * after enabling the clocks managed here. - */ - if (on) { - ret = ufshcd_vops_setup_clocks(hba, on, POST_CHANGE); - if (ret) - return ret; - } + ret = ufshcd_vops_setup_clocks(hba, on, POST_CHANGE); + if (ret) + return ret; out: if (ret) {