diff mbox series

[v2,03/13] iio: chemical: bme680: avoid using camel case

Message ID 20241021195316.58911-4-vassilisamir@gmail.com (mailing list archive)
State Accepted
Headers show
Series : chemical: bme680: 2nd set of cleanup | expand

Commit Message

Vasileios Amoiridis Oct. 21, 2024, 7:53 p.m. UTC
Rename camel case variable, as checkpatch.pl complains.

While at it, fix also the indentation of the array for readability.

Signed-off-by: Vasileios Amoiridis <vassilisamir@gmail.com>
---
 drivers/iio/chemical/bme680_core.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

Comments

Jonathan Cameron Oct. 27, 2024, 9:54 a.m. UTC | #1
On Mon, 21 Oct 2024 21:53:06 +0200
Vasileios Amoiridis <vassilisamir@gmail.com> wrote:

> Rename camel case variable, as checkpatch.pl complains.
> 
> While at it, fix also the indentation of the array for readability.
> 
> Signed-off-by: Vasileios Amoiridis <vassilisamir@gmail.com>
Applied.

> ---
>  drivers/iio/chemical/bme680_core.c | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/iio/chemical/bme680_core.c b/drivers/iio/chemical/bme680_core.c
> index 0b96534c6867..d228f90b4dc6 100644
> --- a/drivers/iio/chemical/bme680_core.c
> +++ b/drivers/iio/chemical/bme680_core.c
> @@ -438,15 +438,15 @@ static u32 bme680_compensate_gas(struct bme680_data *data, u16 gas_res_adc,
>  	u32 calc_gas_res;
>  
>  	/* Look up table for the possible gas range values */
> -	static const u32 lookupTable[16] = {2147483647u, 2147483647u,
> -				2147483647u, 2147483647u, 2147483647u,
> -				2126008810u, 2147483647u, 2130303777u,
> -				2147483647u, 2147483647u, 2143188679u,
> -				2136746228u, 2147483647u, 2126008810u,
> -				2147483647u, 2147483647u};
> +	static const u32 lookup_table[16] = {
> +		2147483647u, 2147483647u, 2147483647u, 2147483647u,
> +		2147483647u, 2126008810u, 2147483647u, 2130303777u,
> +		2147483647u, 2147483647u, 2143188679u, 2136746228u,
> +		2147483647u, 2126008810u, 2147483647u, 2147483647u
> +	};
>  
>  	var1 = ((1340 + (5 * (s64) calib->range_sw_err)) *
> -			((s64) lookupTable[gas_range])) >> 16;
> +			((s64)lookup_table[gas_range])) >> 16;
>  	var2 = ((gas_res_adc << 15) - 16777216) + var1;
>  	var3 = ((125000 << (15 - gas_range)) * var1) >> 9;
>  	var3 += (var2 >> 1);
diff mbox series

Patch

diff --git a/drivers/iio/chemical/bme680_core.c b/drivers/iio/chemical/bme680_core.c
index 0b96534c6867..d228f90b4dc6 100644
--- a/drivers/iio/chemical/bme680_core.c
+++ b/drivers/iio/chemical/bme680_core.c
@@ -438,15 +438,15 @@  static u32 bme680_compensate_gas(struct bme680_data *data, u16 gas_res_adc,
 	u32 calc_gas_res;
 
 	/* Look up table for the possible gas range values */
-	static const u32 lookupTable[16] = {2147483647u, 2147483647u,
-				2147483647u, 2147483647u, 2147483647u,
-				2126008810u, 2147483647u, 2130303777u,
-				2147483647u, 2147483647u, 2143188679u,
-				2136746228u, 2147483647u, 2126008810u,
-				2147483647u, 2147483647u};
+	static const u32 lookup_table[16] = {
+		2147483647u, 2147483647u, 2147483647u, 2147483647u,
+		2147483647u, 2126008810u, 2147483647u, 2130303777u,
+		2147483647u, 2147483647u, 2143188679u, 2136746228u,
+		2147483647u, 2126008810u, 2147483647u, 2147483647u
+	};
 
 	var1 = ((1340 + (5 * (s64) calib->range_sw_err)) *
-			((s64) lookupTable[gas_range])) >> 16;
+			((s64)lookup_table[gas_range])) >> 16;
 	var2 = ((gas_res_adc << 15) - 16777216) + var1;
 	var3 = ((125000 << (15 - gas_range)) * var1) >> 9;
 	var3 += (var2 >> 1);