Re: [PATCH 1/2] soc: qcom: rpmhpd: Rename rpmhpd struct names

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Nov 16, 2021 at 10:56:21AM +0530, Rajendra Nayak wrote:
> The rpmhpd structs were named with a SoC-name prefix, but then
> they got reused across multiple SoC families making things confusing.
> Rename all the struct names to remove SoC-name prefixes.
> No other functional change as part of this patch.
> 
> Signed-off-by: Rajendra Nayak <rnayak@xxxxxxxxxxxxxx>
> ---
>  drivers/soc/qcom/rpmhpd.c | 255 +++++++++++++++++++++++-----------------------
>  1 file changed, 128 insertions(+), 127 deletions(-)
> 
> diff --git a/drivers/soc/qcom/rpmhpd.c b/drivers/soc/qcom/rpmhpd.c
> index 1118345..c71481d 100644
> --- a/drivers/soc/qcom/rpmhpd.c
> +++ b/drivers/soc/qcom/rpmhpd.c
> @@ -63,73 +63,102 @@ struct rpmhpd_desc {
>  
>  static DEFINE_MUTEX(rpmhpd_lock);
>  
> -/* SDM845 RPMH powerdomains */
> +/* RPMH powerdomains */
>  
> -static struct rpmhpd sdm845_ebi = {
> +static struct rpmhpd ebi = {
>  	.pd = { .name = "ebi", },
>  	.res_name = "ebi.lvl",
>  };
>  
> -static struct rpmhpd sdm845_lmx = {
> +static struct rpmhpd lmx = {
>  	.pd = { .name = "lmx", },
>  	.res_name = "lmx.lvl",
>  };
>  
> -static struct rpmhpd sdm845_lcx = {
> +static struct rpmhpd lcx = {
>  	.pd = { .name = "lcx", },
>  	.res_name = "lcx.lvl",
>  };
>  
> -static struct rpmhpd sdm845_gfx = {
> +static struct rpmhpd gfx = {
>  	.pd = { .name = "gfx", },
>  	.res_name = "gfx.lvl",
>  };
>  
> -static struct rpmhpd sdm845_mss = {
> +static struct rpmhpd mss = {
>  	.pd = { .name = "mss", },
>  	.res_name = "mss.lvl",
>  };
>  
> -static struct rpmhpd sdm845_mx_ao;
> -static struct rpmhpd sdm845_mx = {
> +static struct rpmhpd mx_ao;
> +static struct rpmhpd mx = {
>  	.pd = { .name = "mx", },
> -	.peer = &sdm845_mx_ao,
> +	.peer = &mx_ao,
>  	.res_name = "mx.lvl",
>  };
>  
> -static struct rpmhpd sdm845_mx_ao = {
> +static struct rpmhpd mx_ao = {
>  	.pd = { .name = "mx_ao", },
>  	.active_only = true,
> -	.peer = &sdm845_mx,
> +	.peer = &mx,
>  	.res_name = "mx.lvl",
>  };
>  
> -static struct rpmhpd sdm845_cx_ao;
> -static struct rpmhpd sdm845_cx = {
> +static struct rpmhpd cx_ao;
> +static struct rpmhpd cx = {
>  	.pd = { .name = "cx", },
> -	.peer = &sdm845_cx_ao,
> -	.parent = &sdm845_mx.pd,
> +	.peer = &cx_ao,
> +	.parent = &mx.pd,
>  	.res_name = "cx.lvl",
>  };
>  
> -static struct rpmhpd sdm845_cx_ao = {
> +static struct rpmhpd cx_ao = {
>  	.pd = { .name = "cx_ao", },
>  	.active_only = true,
> -	.peer = &sdm845_cx,
> -	.parent = &sdm845_mx_ao.pd,
> +	.peer = &cx,
> +	.parent = &mx_ao.pd,
>  	.res_name = "cx.lvl",
>  };
>  
> +static struct rpmhpd mmcx_ao;
> +static struct rpmhpd mmcx = {
> +	.pd = { .name = "mmcx", },
> +	.peer = &mmcx_ao,
> +	.res_name = "mmcx.lvl",
> +};
> +
> +static struct rpmhpd mmcx_ao = {
> +	.pd = { .name = "mmcx_ao", },
> +	.active_only = true,
> +	.peer = &mmcx,
> +	.res_name = "mmcx.lvl",
> +};
> +
> +static struct rpmhpd mxc_ao;
> +static struct rpmhpd mxc = {
> +	.pd = { .name = "mxc", },
> +	.peer = &mxc_ao,
> +	.res_name = "mxc.lvl",
> +};
> +
> +static struct rpmhpd mxc_ao = {
> +	.pd = { .name = "mxc_ao", },
> +	.active_only = true,
> +	.peer = &mxc,
> +	.res_name = "mxc.lvl",
> +};
> +
> +/* SDM845 RPMH powerdomains */
>  static struct rpmhpd *sdm845_rpmhpds[] = {
> -	[SDM845_EBI] = &sdm845_ebi,
> -	[SDM845_MX] = &sdm845_mx,
> -	[SDM845_MX_AO] = &sdm845_mx_ao,
> -	[SDM845_CX] = &sdm845_cx,
> -	[SDM845_CX_AO] = &sdm845_cx_ao,
> -	[SDM845_LMX] = &sdm845_lmx,
> -	[SDM845_LCX] = &sdm845_lcx,
> -	[SDM845_GFX] = &sdm845_gfx,
> -	[SDM845_MSS] = &sdm845_mss,
> +	[SDM845_EBI] = &ebi,
> +	[SDM845_MX] = &mx,
> +	[SDM845_MX_AO] = &mx_ao,
> +	[SDM845_CX] = &cx,
> +	[SDM845_CX_AO] = &cx_ao,
> +	[SDM845_LMX] = &lmx,
> +	[SDM845_LCX] = &lcx,
> +	[SDM845_GFX] = &gfx,
> +	[SDM845_MSS] = &mss,
>  };

nit: some PD lists are ordered alphabetically, others aren't, since you are
already changing them you could use alphabetical order for all of them.

Just a nit though, the change generally looks good to me, so:

Reviewed-by: Matthias Kaehlcke <mka@xxxxxxxxxxxx>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux