devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Adrian Hunter <adrian.hunter@intel.com>
To: Chen Wang <unicornxw@gmail.com>,
	aou@eecs.berkeley.edu, conor+dt@kernel.org, guoren@kernel.org,
	inochiama@outlook.com, jszhang@kernel.org,
	krzysztof.kozlowski+dt@linaro.org, palmer@dabbelt.com,
	paul.walmsley@sifive.com, robh@kernel.org,
	ulf.hansson@linaro.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org,
	linux-riscv@lists.infradead.org, chao.wei@sophgo.com,
	haijiao.liu@sophgo.com, xiaoguang.xing@sophgo.com,
	tingzhu.wang@sophgo.com
Cc: Chen Wang <unicorn_wang@outlook.com>
Subject: Re: [PATCH v3 2/4] mmc: sdhci-of-dwcmshc: unify the naming of soc helper functions
Date: Fri, 14 Jun 2024 13:18:02 +0300	[thread overview]
Message-ID: <aff10a8c-bac8-49ba-af0b-3681961eff80@intel.com> (raw)
In-Reply-To: <91adce8d020faa22a97719e8774dda01a58333e7.1718241495.git.unicorn_wang@outlook.com>

On 13/06/24 04:42, Chen Wang wrote:
> From: Chen Wang <unicorn_wang@outlook.com>
> 
> Continue another patch: "mmc: sdhci-of-dwcmshc: adjust positions
> of helper routines".
> 
> The helper functions at the dwcmshc level are all prefixed with
> "dwcmshc_", which is easier to identify, while the functions at
> the soc level are more confusing. Now they are uniformly prefixed
> with the soc type string, such as "rk35xx_", "th1520_", etc.

This does not seem to be necessary.

Unnecessarily churning the code makes backports more difficult and
complicates the code history, so it should be avoided in general.

> 
> Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
> ---
>  drivers/mmc/host/sdhci-of-dwcmshc.c | 16 ++++++++--------
>  1 file changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/mmc/host/sdhci-of-dwcmshc.c b/drivers/mmc/host/sdhci-of-dwcmshc.c
> index a68818f53786..346d2d323a05 100644
> --- a/drivers/mmc/host/sdhci-of-dwcmshc.c
> +++ b/drivers/mmc/host/sdhci-of-dwcmshc.c
> @@ -193,7 +193,7 @@
>  					 SDHCI_TRNS_BLK_CNT_EN | \
>  					 SDHCI_TRNS_DMA)
>  
> -enum dwcmshc_rk_type {
> +enum rk35xx_type {
>  	DWCMSHC_RK3568,
>  	DWCMSHC_RK3588,
>  };
> @@ -202,7 +202,7 @@ struct rk35xx_priv {
>  	/* Rockchip specified optional clocks */
>  	struct clk_bulk_data rockchip_clks[RK35xx_MAX_CLKS];
>  	struct reset_control *reset;
> -	enum dwcmshc_rk_type devtype;
> +	enum rk35xx_type devtype;
>  	u8 txclk_tapnum;
>  };
>  
> @@ -621,7 +621,7 @@ static unsigned int rk35xx_get_max_clock(struct sdhci_host *host)
>  	return clk_round_rate(pltfm_host->clk, ULONG_MAX);
>  }
>  
> -static void dwcmshc_rk3568_set_clock(struct sdhci_host *host, unsigned int clock)
> +static void rk3568_set_clock(struct sdhci_host *host, unsigned int clock)
>  {
>  	struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
>  	struct dwcmshc_priv *dwc_priv = sdhci_pltfm_priv(pltfm_host);
> @@ -749,7 +749,7 @@ static void rk35xx_sdhci_reset(struct sdhci_host *host, u8 mask)
>  	sdhci_reset(host, mask);
>  }
>  
> -static int dwcmshc_rk35xx_init(struct sdhci_host *host, struct dwcmshc_priv *dwc_priv)
> +static int rk35xx_init(struct sdhci_host *host, struct dwcmshc_priv *dwc_priv)
>  {
>  	int err;
>  	struct rk35xx_priv *priv = dwc_priv->priv;
> @@ -790,7 +790,7 @@ static int dwcmshc_rk35xx_init(struct sdhci_host *host, struct dwcmshc_priv *dwc
>  	return 0;
>  }
>  
> -static void dwcmshc_rk35xx_postinit(struct sdhci_host *host, struct dwcmshc_priv *dwc_priv)
> +static void rk35xx_postinit(struct sdhci_host *host, struct dwcmshc_priv *dwc_priv)
>  {
>  	/*
>  	 * Don't support highspeed bus mode with low clk speed as we
> @@ -1062,7 +1062,7 @@ static const struct sdhci_ops sdhci_dwcmshc_ops = {
>  };
>  
>  static const struct sdhci_ops sdhci_dwcmshc_rk35xx_ops = {
> -	.set_clock		= dwcmshc_rk3568_set_clock,
> +	.set_clock		= rk3568_set_clock,
>  	.set_bus_width		= sdhci_set_bus_width,
>  	.set_uhs_signaling	= dwcmshc_set_uhs_signaling,
>  	.get_max_clock		= rk35xx_get_max_clock,
> @@ -1243,7 +1243,7 @@ static int dwcmshc_probe(struct platform_device *pdev)
>  
>  		priv->priv = rk_priv;
>  
> -		err = dwcmshc_rk35xx_init(host, priv);
> +		err = rk35xx_init(host, priv);
>  		if (err)
>  			goto err_clk;
>  	}
> @@ -1300,7 +1300,7 @@ static int dwcmshc_probe(struct platform_device *pdev)
>  	}
>  
>  	if (rk_priv)
> -		dwcmshc_rk35xx_postinit(host, priv);
> +		rk35xx_postinit(host, priv);
>  
>  	err = __sdhci_add_host(host);
>  	if (err)


  reply	other threads:[~2024-06-14 10:18 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-13  1:42 [PATCH v3 0/4] mmc: sdhci-of-dwcmshc: enhance framework Chen Wang
2024-06-13  1:42 ` [PATCH v3 1/4] mmc: sdhci-of-dwcmshc: adjust positions of helper routines Chen Wang
2024-06-14 10:16   ` Adrian Hunter
2024-06-18  0:13     ` Chen Wang
2024-06-13  1:42 ` [PATCH v3 2/4] mmc: sdhci-of-dwcmshc: unify the naming of soc helper functions Chen Wang
2024-06-14 10:18   ` Adrian Hunter [this message]
2024-06-18  0:13     ` Chen Wang
2024-06-13  1:43 ` [PATCH v3 3/4] mmc: sdhci-of-dwcmshc: extract init function for rk35xx/th1520 Chen Wang
2024-06-14 10:33   ` Adrian Hunter
2024-06-18  0:04     ` Chen Wang
2024-06-13  1:43 ` [PATCH v3 4/4] mmc: sdhci-of-dwcmshc: add callback functions for dwcmshc Chen Wang
2024-06-14 10:52   ` Adrian Hunter
2024-06-18  0:07     ` Chen Wang
2024-06-16  2:30 ` [PATCH v3 0/4] mmc: sdhci-of-dwcmshc: enhance framework Drew Fustini
2024-06-18  0:12   ` Chen Wang
2024-06-17 14:18 ` Jisheng Zhang
2024-06-18  0:08   ` Chen Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aff10a8c-bac8-49ba-af0b-3681961eff80@intel.com \
    --to=adrian.hunter@intel.com \
    --cc=aou@eecs.berkeley.edu \
    --cc=chao.wei@sophgo.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=guoren@kernel.org \
    --cc=haijiao.liu@sophgo.com \
    --cc=inochiama@outlook.com \
    --cc=jszhang@kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    --cc=robh@kernel.org \
    --cc=tingzhu.wang@sophgo.com \
    --cc=ulf.hansson@linaro.org \
    --cc=unicorn_wang@outlook.com \
    --cc=unicornxw@gmail.com \
    --cc=xiaoguang.xing@sophgo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).