Re: [PATCH 4/7] soc: qcom: rpmpd: Remove SoC names from RPMPD names

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

 



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@xxxxxxxxxx>
---
  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




[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