lkml.org 
[lkml]   [2023]   [Jan]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 4/7] soc: qcom: rpmpd: Remove SoC names from RPMPD names
From
On 25/01/2023 05:27, Konrad Dybcio wrote:
> SoC names were used only to distinguish between defines. That made
> reusing them messy and often times, the same RPM power domains were
> defined multiple times. Assign descriptive, SoC-independent names to
> each RPMPD description struct and remove duplicate definitions.
>
> Bloat-o-meter results:
> Total: Before=133713, After=74201, chg -44.51%
>
> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
> ---
> drivers/soc/qcom/rpmpd.c | 763 +++++++++++----------------------------
> 1 file changed, 205 insertions(+), 558 deletions(-)
>
> diff --git a/drivers/soc/qcom/rpmpd.c b/drivers/soc/qcom/rpmpd.c
> index a69182618b76..9fff40527f9e 100644
> --- a/drivers/soc/qcom/rpmpd.c
> +++ b/drivers/soc/qcom/rpmpd.c
> @@ -69,50 +69,50 @@ struct rpmpd_desc {
> static DEFINE_MUTEX(rpmpd_lock);
>
> /* mdm9607 RPM Power Domains */
> -static struct rpmpd mdm9607_vddcx_ao;
> -static struct rpmpd mdm9607_vddcx = {
> +static struct rpmpd cx_s3a_lvl_ao;
> +static struct rpmpd cx_s3a_lvl = {
> .pd = { .name = "vddcx", },
> - .peer = &mdm9607_vddcx_ao,
> + .peer = &cx_s3a_lvl_ao,
> .res_type = RPMPD_SMPA,
> .res_id = 3,
> .key = KEY_LEVEL,
> };
>
> -static struct rpmpd mdm9607_vddcx_ao = {
> +static struct rpmpd cx_s3a_lvl_ao = {
> .pd = { .name = "vddcx_ao", },
> - .peer = &mdm9607_vddcx,
> + .peer = &cx_s3a_lvl,
> .active_only = true,
> .res_type = RPMPD_SMPA,
> .res_id = 3,
> .key = KEY_LEVEL,
> };
>
> -static struct rpmpd mdm9607_vddcx_vfl = {
> +static struct rpmpd cx_s3a_lvl_vfl = {

As you are already adding _lvl to the name, _lvl_floor might be betther
than _lvl_vfl.

> .pd = { .name = "vddcx_vfl", },
> .res_type = RPMPD_SMPA,
> .res_id = 3,
> .key = KEY_FLOOR_LEVEL,
> };

[skipped]

--
With best wishes
Dmitry

\
 
 \ /
  Last update: 2023-03-26 23:55    [W:0.036 / U:0.376 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site