Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp3622136rdh; Mon, 27 Nov 2023 21:32:06 -0800 (PST) X-Google-Smtp-Source: AGHT+IG259wMRLxqnBT6CTO00KpFNGGWi3Iz5yj28yGD3315DFExMCEeO/uSX2ONP/FI1n/qrvna X-Received: by 2002:a05:6a21:3988:b0:18a:df45:fad4 with SMTP id ad8-20020a056a21398800b0018adf45fad4mr16557293pzc.37.1701149526414; Mon, 27 Nov 2023 21:32:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701149526; cv=none; d=google.com; s=arc-20160816; b=KHP+QtL6YKX5UfJUKOotZUdvD3Q9eiOFKG+nkK5bVTlZ7bO4SVQT6tRMYZPcmWOnMx v4j5d+WraA/99Pahe+2zhd3pmDBoZJQODjANV+3AbiiLrbxexkQxws/OQYm5q5FyX9ZE 9/usUG/UtCaIqZIiolc0lgeU3Bh7LpxQ9qBeSdClVc3VVQe9UMC31UWaKwYhC8HTxYgk 6HhzUdjqSDJpXqg6Ka7Vm8oGifzKYlu3Jud+HXIp0d9MdKzkcfW4o5d6yZT6S0HPY+sF 3ULQ1/FSdl2tp7VaWzf6Jqb2l8abyXoxaa+lJdcMuiIbcREdV7TC8xfoeG0bjx//n2W+ XhzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=ULDFvRII67JICKF1ngsI/+spoVaUpBYakVObDL7VJdo=; fh=4rX1CSB8PKijQmbOTLJsMouGR0dVfMnPToqDARjBIyk=; b=Dtl+gNMK+mih74X+r4L+HaD7WXK5Z7IqhmTWQXr1BSWera448EgFCkrkGPTvEXTtfK djCAAQS9PCmAIkSuLizx9FeFoErrTdxOgT1E3TreTiVHMBeCqePmAKfaS+Y8Ibu7JUSd 8SyXTVNbaAJWrjM304WL42+JVue+Klz6Cpxrl2tmpH6Ru1Q8XpC4/Oq1jBR1GqfQUrtl x7GcOcxl1V98Ch9E4qsWSOAvGad4/LAfNSjDEgyNsLFCuPnAWnkCbhXvlxfIhmjtqWx+ gDSchmFeC8H+mze2tS/Lbg63NSfJbgSsllrE6rU1X6p8z7S2aIvJe6LjUrAQLrCMTemz 1JeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NRi3Vek1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id k10-20020a634b4a000000b005c1ce5625cbsi11221200pgl.232.2023.11.27.21.32.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 21:32:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NRi3Vek1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id BA82582B92AB; Mon, 27 Nov 2023 21:32:03 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234606AbjK1Fbu (ORCPT + 99 others); Tue, 28 Nov 2023 00:31:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41344 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232858AbjK1Fbt (ORCPT ); Tue, 28 Nov 2023 00:31:49 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A25B9E1 for ; Mon, 27 Nov 2023 21:31:55 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EA92EC433C7; Tue, 28 Nov 2023 05:31:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701149515; bh=v86g/w5UVdKRwoRwl5qtMmOEiCat+JZJrejLbCzYiFM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=NRi3Vek1IJ6VsndC2Zvoo8Q3JSVLSaHY9DSPcgRKora82lOBcHGlpY6f8Z/xnr5xM NI6rMqvQ2FGAczTVvGabzprYc9lzTM/Y/r+DSpjcoZ7reM+sxoc25NcEKo/7J/NFtg Ep+xrpBtdF93Fgizi5II01JViLtuXluILmpOw/J0y1zg6SGInJlcR6hbqpjvxAxKNb UFvON1qygUSFmUSIbttmIjKdYykwQP1M8Xvzhpg783fCd4BvEzq2x1UZiXNjrK5ZJQ 1W9P5uxASKywYx5shIlSt/e9hEqBNP3pdzEPAKJUElgqV6ikbro6mcBrWgOFeVbkP8 OkgYKrVZ+cGVA== Date: Tue, 28 Nov 2023 11:01:36 +0530 From: Manivannan Sadhasivam To: Can Guo Cc: bvanassche@acm.org, adrian.hunter@intel.com, beanhuo@micron.com, avri.altman@wdc.com, junwoo80.lee@samsung.com, martin.petersen@oracle.com, linux-scsi@vger.kernel.org, linux-arm-msm@vger.kernel.org, Alim Akhtar , "James E.J. Bottomley" , Krzysztof Kozlowski , Stanley Chu , Andy Gross , Bjorn Andersson , Konrad Dybcio , Matthias Brugger , AngeloGioacchino Del Regno , Andrew Halaney , Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= , Brian Masney , "moderated list:ARM/SAMSUNG S3C, S5P AND EXYNOS ARM ARCHITECTURES" , "open list:ARM/SAMSUNG S3C, S5P AND EXYNOS ARM ARCHITECTURES" , open list , "moderated list:UNIVERSAL FLASH STORAGE HOST CONTROLLER DRIVER..." Subject: Re: [PATCH v5 01/10] scsi: ufs: host: Rename structure ufs_dev_params to ufs_host_params Message-ID: <20231128053136.GE3088@thinkpad> References: <1700729190-17268-1-git-send-email-quic_cang@quicinc.com> <1700729190-17268-2-git-send-email-quic_cang@quicinc.com> <20231128051917.GB3088@thinkpad> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20231128051917.GB3088@thinkpad> X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Mon, 27 Nov 2023 21:32:03 -0800 (PST) On Tue, Nov 28, 2023 at 10:49:36AM +0530, Manivannan Sadhasivam wrote: > On Thu, Nov 23, 2023 at 12:46:21AM -0800, Can Guo wrote: > > Structure ufs_dev_params is actually used in UFS host vendor drivers to > > declare host specific power mode parameters, like ufs__params or > > host_cap, which makes the code not very straightforward to read. Rename the > > structure ufs_dev_params to ufs_host_params and unify the declarations in > > all vendor drivers to host_params. > > > > In addition, rename the two functions ufshcd_init_pwr_dev_param() and > > ufshcd_get_pwr_dev_param() which work based on the ufs_host_params to > > ufshcd_init_host_param() and ufshcd_negotiate_pwr_param() respectively to > > avoid confusions. > > > > This change does not change any functionalities or logic. > > > > Acked-by: Andrew Halaney > > Signed-off-by: Can Guo > > Reviewed-by: Manivannan Sadhasivam > > - Mani > > > --- > > drivers/ufs/host/ufs-exynos.c | 7 ++-- > > drivers/ufs/host/ufs-hisi.c | 11 +++---- > > drivers/ufs/host/ufs-mediatek.c | 12 +++---- > > drivers/ufs/host/ufs-qcom.c | 12 +++---- > > drivers/ufs/host/ufshcd-pltfrm.c | 69 ++++++++++++++++++++-------------------- > > drivers/ufs/host/ufshcd-pltfrm.h | 10 +++--- > > 6 files changed, 57 insertions(+), 64 deletions(-) > > [...] > > diff --git a/drivers/ufs/host/ufshcd-pltfrm.h b/drivers/ufs/host/ufshcd-pltfrm.h > > index a86a3ad..2d4d047 100644 > > --- a/drivers/ufs/host/ufshcd-pltfrm.h > > +++ b/drivers/ufs/host/ufshcd-pltfrm.h > > @@ -10,7 +10,7 @@ > > #define UFS_PWM_MODE 1 > > #define UFS_HS_MODE 2 > > > > -struct ufs_dev_params { > > +struct ufs_host_params { > > u32 pwm_rx_gear; /* pwm rx gear to work in */ > > u32 pwm_tx_gear; /* pwm tx gear to work in */ > > u32 hs_rx_gear; /* hs rx gear to work in */ > > @@ -25,10 +25,10 @@ struct ufs_dev_params { > > u32 desired_working_mode; > > }; > > > > -int ufshcd_get_pwr_dev_param(const struct ufs_dev_params *dev_param, > > - const struct ufs_pa_layer_attr *dev_max, > > - struct ufs_pa_layer_attr *agreed_pwr); > > -void ufshcd_init_pwr_dev_param(struct ufs_dev_params *dev_param); > > +int ufshcd_negotiate_pwr_param(const struct ufs_host_params *host_param, > > + const struct ufs_pa_layer_attr *dev_max, > > + struct ufs_pa_layer_attr *agreed_pwr); > > +void ufshcd_init_host_param(struct ufs_host_params *host_param); Noticed this after giving my R-b tag. Could you please rename the functions to: int ufshcd_negotiate_pwr_params(const struct ufs_host_params *host_params,... void ufshcd_init_host_params(struct ufs_host_params *host_params); Not a big deal, but since the argument passed to both functions are 'params', it'd be good if the function definition also use the same plural form. - Mani -- மணிவண்ணன் சதாசிவம்