Skip to contentSkip to conversation

thermal: amlogic: Rename Uptat to uptat to follow kernel coding style

PATCH Applied Enrique Isidoro Vazquez Ramos 2 participants 3 messages Mar 25, 2025 – Apr 30, 2025 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 thermal: amlogic: Rename Uptat to uptat to follow kernel coding style

The variable Uptat uses CamelCase, which violates the kernel's coding style that mandates snake_case for variable names. This is a purely cosmetic change with no functional impact.

Compilation tested with:
- checkpatch.pl --strict passed (no new warnings/errors).

---
 drivers/thermal/amlogic_thermal.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
drivers/thermal/amlogic_thermal.c +8 -8
index 3c5f7dbddf2c..5448d772db12 100644
@@ -7,10 +7,10 @@
  *
  * Register value to celsius temperature formulas:
  *	Read_Val	    m * U
- * U = ---------, Uptat = ---------
+ * U = ---------, uptat = ---------
  *	2^16		  1 + n * U
  *
- * Temperature = A * ( Uptat + u_efuse / 2^16 )- B
+ * Temperature = A * ( uptat + u_efuse / 2^16 )- B
  *
  *  A B m n : calibration parameters
  *  u_efuse : fused calibration value, it's a signed 16 bits value
@@ -112,7 +112,7 @@ static int amlogic_thermal_code_to_millicelsius(struct amlogic_thermal *pdata,
 	const struct amlogic_thermal_soc_calib_data *param =
 					pdata->data->calibration_parameters;
 	int temp;
-	s64 factor, Uptat, uefuse;
+	s64 factor, uptat, uefuse;
 
 	uefuse = pdata->trim_info & TSENSOR_TRIM_SIGN_MASK ?
 			     ~(pdata->trim_info & TSENSOR_TRIM_TEMP_MASK) + 1 :
@@ -121,12 +121,12 @@ static int amlogic_thermal_code_to_millicelsius(struct amlogic_thermal *pdata,
 	factor = param->n * temp_code;
 	factor = div_s64(factor, 100);
 
-	Uptat = temp_code * param->m;
-	Uptat = div_s64(Uptat, 100);
-	Uptat = Uptat * BIT(16);
-	Uptat = div_s64(Uptat, BIT(16) + factor);
+	uptat = temp_code * param->m;
+	uptat = div_s64(uptat, 100);
+	uptat = uptat * BIT(16);
+	uptat = div_s64(uptat, BIT(16) + factor);
 
-	temp = (Uptat + uefuse) * param->A;
+	temp = (uptat + uefuse) * param->A;
 	temp = div_s64(temp, BIT(16));
 	temp = (temp - param->B) * 100;
 
Signature · 1 line
2.39.5
#1 lore raw
Quoted 9 lines · Enrique Isidoro Vazquez Ramos

The variable Uptat uses CamelCase, which violates the kernel's coding style that mandates snake_case for variable names. This is a purely cosmetic change with no functional impact.

Compilation tested with:
- checkpatch.pl --strict passed (no new warnings/errors).

---

Applied, thanks

A message that is not in the archive (sent off-list or not yet received): CANfmkGDVks5tqgDw0ZvNMxT_vfD8rUKyZZJ4LUK6k637wt7=-A@mail.gmail.com

#3 lore raw
Quoted 6 lines · Enrique

Hi Daniel,

Thank you for applying my patch! I’m trying to verify where it was merged. Could you confirm if it’s in the staging-testing branch or another tree?

Commit hash: 84fe0cc6fddb6afcdca838d80756080f84cf9ecd

https://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux.git/commit/?h=thermal/linux-next&id=b8e05d5de934c037594f4ad3550b8228da1b9c2d

Quoted 22 lines

Best regards,
Enrique Vazquez

El vie, 18 abr 2025 a la(s) 4:15 a.m., Daniel Lezcano ([email protected] <mailto:[email protected]>) escribió:

    On Tue, Mar 25, 2025 at 01:30:44PM -0600, Enrique Isidoro Vazquez
    Ramos wrote:
     > The variable Uptat uses CamelCase, which violates the kernel's coding
     > style that mandates snake_case for variable names. This is a purely
     > cosmetic change with no functional impact.
     >
     > Compilation tested with:
     > - checkpatch.pl <http://checkpatch.pl> --strict passed (no new
    warnings/errors).
     >
     > Signed-off-by: Enrique Isidoro Vazquez Ramos
    <[email protected] <mailto:[email protected]>>
     > ---

    Applied, thanks
Signature · 5 lines
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog