Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp237195pxu; Fri, 4 Dec 2020 01:55:12 -0800 (PST) X-Google-Smtp-Source: ABdhPJzE8ypgCnh7m6K6vqm4/wwrmP/ghm/yZ9nDXqTpqQ1nhk7XFCAJMoJ1CnemPdHfi44gulDs X-Received: by 2002:a17:906:2b95:: with SMTP id m21mr6479814ejg.134.1607075712491; Fri, 04 Dec 2020 01:55:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607075712; cv=none; d=google.com; s=arc-20160816; b=fIDKpI4km9nTqVSp1XPQrojlS7/Zs43rMKzWasCNyLZv6u6fPNZWdK7ibgSChSPMjS HL6YSEcMnW8pqd1nPo1xrayjgvz174LWwwM+BDC53lk8NDRnm5R6no47UPJWGrZOz0/i i3E4zWO1O8bLWKoK+e7ZiFma271qEzv5FYESHHkfGcw4irrNpWdpT0eCddDjiw6TjH4P IqCLPg3BH4tGgSY1kSEKRirq+f9cb9ZSIa8RKcWj9IelOjMWsBWe6ppoqNyeaneqyrtZ OaSVcxfwNRfdHDKAesyVIO1blilGyQDxj6O7gHtnU1KzEYpu01ii47U6SH04pXRlA1jq Q2Zg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=Tr/Y7eGta2O+T0Cn87WrW1rLnY1Jcon70VaSdfIUbHk=; b=On2alX7PDLkcGL020gUd4HmqF6XZQbTeAnzFCm+uzB7BplB90U63XLy2veLoe5sCio CbAbD+9Zc2RuZMtMtuMa6fD+tXPJpASWZn1S2y6d+sJlmYZrYjbI0pUMKkW1ylBu9I8s fl6p8jhCLg4Ct++gYkTtKnORfHIotFdk687zmlu4Zio3pm22Vp7TUXHUy/wtqgwCEn/W +6f/ADUCbJxpstaq/R5CBixWMZWK8UZ1/9JQbUmk2uzko1a6PcR6wLDqsCvMeGr+ETEN iUrTImBkLFgIbyLecydB9DMVZyhxttdvH5dWPOSElbSzux3kCuiQYYLE4CoHdl3/h9oa dtsw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 38si2530733edq.246.2020.12.04.01.54.50; Fri, 04 Dec 2020 01:55:12 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387932AbgLDJvP (ORCPT + 99 others); Fri, 4 Dec 2020 04:51:15 -0500 Received: from mailgw02.mediatek.com ([210.61.82.184]:34621 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S2387867AbgLDJvM (ORCPT ); Fri, 4 Dec 2020 04:51:12 -0500 X-UUID: 4069ad15717f4d08b707dfe057e7c545-20201204 X-UUID: 4069ad15717f4d08b707dfe057e7c545-20201204 Received: from mtkcas06.mediatek.inc [(172.21.101.30)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.14 Build 0819 with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1227462729; Fri, 04 Dec 2020 17:50:30 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs08n2.mediatek.inc (172.21.101.56) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 4 Dec 2020 17:50:07 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Fri, 4 Dec 2020 17:50:05 +0800 From: Stanley Chu To: , , , , CC: , , , , , , , , , , , , , , , , , Stanley Chu Subject: [PATCH v3 1/8] scsi: ufs: Remove unused setup_regulators variant function Date: Fri, 4 Dec 2020 17:50:00 +0800 Message-ID: <20201204095007.20639-2-stanley.chu@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20201204095007.20639-1-stanley.chu@mediatek.com> References: <20201204095007.20639-1-stanley.chu@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-SNTS-SMTP: 1E162314F9333B50FE3B453AD71A9AA1DE08E1FE37874C1120432C082AE5FB9C2000:8 X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Since setup_regulators variant function is not used by any vendors, simply remove it. Signed-off-by: Stanley Chu --- drivers/scsi/ufs/ufshcd.c | 10 +--------- drivers/scsi/ufs/ufshcd.h | 10 ---------- 2 files changed, 1 insertion(+), 19 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 11a4aad09f3a..c2f611516ea7 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -8171,16 +8171,10 @@ static int ufshcd_variant_hba_init(struct ufs_hba *hba) goto out; err = ufshcd_vops_init(hba); - if (err) - goto out; - - err = ufshcd_vops_setup_regulators(hba, true); - if (err) - ufshcd_vops_exit(hba); -out: if (err) dev_err(hba->dev, "%s: variant %s init failed err %d\n", __func__, ufshcd_get_var_name(hba), err); +out: return err; } @@ -8189,8 +8183,6 @@ static void ufshcd_variant_hba_exit(struct ufs_hba *hba) if (!hba->vops) return; - ufshcd_vops_setup_regulators(hba, false); - ufshcd_vops_exit(hba); } diff --git a/drivers/scsi/ufs/ufshcd.h b/drivers/scsi/ufs/ufshcd.h index 7a7e056a33a9..21de7607611f 100644 --- a/drivers/scsi/ufs/ufshcd.h +++ b/drivers/scsi/ufs/ufshcd.h @@ -277,7 +277,6 @@ struct ufs_pwr_mode_info { * @get_ufs_hci_version: called to get UFS HCI version * @clk_scale_notify: notifies that clks are scaled up/down * @setup_clocks: called before touching any of the controller registers - * @setup_regulators: called before accessing the host controller * @hce_enable_notify: called before and after HCE enable bit is set to allow * variant specific Uni-Pro initialization. * @link_startup_notify: called before and after Link startup is carried out @@ -307,7 +306,6 @@ struct ufs_hba_variant_ops { enum ufs_notify_change_status); int (*setup_clocks)(struct ufs_hba *, bool, enum ufs_notify_change_status); - int (*setup_regulators)(struct ufs_hba *, bool); int (*hce_enable_notify)(struct ufs_hba *, enum ufs_notify_change_status); int (*link_startup_notify)(struct ufs_hba *, @@ -1119,14 +1117,6 @@ static inline int ufshcd_vops_setup_clocks(struct ufs_hba *hba, bool on, return 0; } -static inline int ufshcd_vops_setup_regulators(struct ufs_hba *hba, bool status) -{ - if (hba->vops && hba->vops->setup_regulators) - return hba->vops->setup_regulators(hba, status); - - return 0; -} - static inline int ufshcd_vops_hce_enable_notify(struct ufs_hba *hba, bool status) { -- 2.18.0