public inbox for linux-iio@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] iio: adc: ad7173: codestyle cleanup
@ 2026-04-13 13:42 Sanjay Chitroda
  2026-04-13 13:42 ` [PATCH 1/3] iio: adc: ad7173: cleanup codestyle error Sanjay Chitroda
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Sanjay Chitroda @ 2026-04-13 13:42 UTC (permalink / raw)
  To: lars, Michael.Hennerich, jic23
  Cc: dlechner, nuno.sa, andy, linux-iio, linux-kernel

From: Sanjay Chitroda <sanjayembeddedse@gmail.com>

Hi all,

This patch series clean up error, warning(s) and a check reported
with checkpatch and no functional behavior changes are intended.

Testing:
  - Compiled with W=1
  - Build-tested on QEMU x86_64

Based on:
  <linux-v7.0-rc5>

Feedback and reviews are very welcome.

Thanks,
Sanjay Chitroda

Sanjay Chitroda (3):
  iio: adc: ad7173: cleanup codestyle error
  iio: adc: ad7173: cleanup codestyle warning(s)
  iio: adc: ad7173: cleanup codestyle check and spell correct

 drivers/iio/adc/ad7173.c | 21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 1/3] iio: adc: ad7173: cleanup codestyle error
  2026-04-13 13:42 [PATCH 0/3] iio: adc: ad7173: codestyle cleanup Sanjay Chitroda
@ 2026-04-13 13:42 ` Sanjay Chitroda
  2026-04-13 13:42 ` [PATCH 2/3] iio: adc: ad7173: cleanup codestyle warning(s) Sanjay Chitroda
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 8+ messages in thread
From: Sanjay Chitroda @ 2026-04-13 13:42 UTC (permalink / raw)
  To: lars, Michael.Hennerich, jic23
  Cc: dlechner, nuno.sa, andy, linux-iio, linux-kernel

From: Sanjay Chitroda <sanjayembeddedse@gmail.com>

Reported by checkpatch:
FILE: drivers/iio/adc/ad7173.c

ERROR: open brace '{' function definitions go on the next line

Signed-off-by: Sanjay Chitroda <sanjayembeddedse@gmail.com>
---
 drivers/iio/adc/ad7173.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/iio/adc/ad7173.c b/drivers/iio/adc/ad7173.c
index d36612352b44..f76a9e08f39e 100644
--- a/drivers/iio/adc/ad7173.c
+++ b/drivers/iio/adc/ad7173.c
@@ -1763,7 +1763,8 @@ static int ad7173_validate_openwire_ain_inputs(struct ad7173_state *st,
 static unsigned int ad7173_calc_openwire_thrsh_raw(struct ad7173_state *st,
 						   struct iio_chan_spec *chan,
 						   struct ad7173_channel *chan_st_priv,
-						   unsigned int thrsh_mv) {
+						   unsigned int thrsh_mv)
+{
 	unsigned int thrsh_raw;
 
 	thrsh_raw =
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/3] iio: adc: ad7173: cleanup codestyle warning(s)
  2026-04-13 13:42 [PATCH 0/3] iio: adc: ad7173: codestyle cleanup Sanjay Chitroda
  2026-04-13 13:42 ` [PATCH 1/3] iio: adc: ad7173: cleanup codestyle error Sanjay Chitroda
@ 2026-04-13 13:42 ` Sanjay Chitroda
  2026-04-13 13:42 ` [PATCH 3/3] iio: adc: ad7173: cleanup codestyle check and spell correct Sanjay Chitroda
  2026-04-13 14:09 ` [PATCH 0/3] iio: adc: ad7173: codestyle cleanup David Lechner
  3 siblings, 0 replies; 8+ messages in thread
From: Sanjay Chitroda @ 2026-04-13 13:42 UTC (permalink / raw)
  To: lars, Michael.Hennerich, jic23
  Cc: dlechner, nuno.sa, andy, linux-iio, linux-kernel

From: Sanjay Chitroda <sanjayembeddedse@gmail.com>

Reported by checkpatch:
FILE: drivers/iio/adc/ad7173.c

WARNING: Statements should start on a tabstop

Signed-off-by: Sanjay Chitroda <sanjayembeddedse@gmail.com>
---
 drivers/iio/adc/ad7173.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/iio/adc/ad7173.c b/drivers/iio/adc/ad7173.c
index f76a9e08f39e..b9c563947e2e 100644
--- a/drivers/iio/adc/ad7173.c
+++ b/drivers/iio/adc/ad7173.c
@@ -666,12 +666,12 @@ static bool ad7173_is_setup_equal(const struct ad7173_channel_config *cfg1,
 	 */
 	static_assert(sizeof_field(struct ad7173_channel_config, config_props) ==
 		      sizeof(struct {
-				     bool bipolar;
-				     bool input_buf;
-				     u16 sinc3_odr_div;
-				     u8 sinc5_odr_index;
-				     u8 ref_sel;
-				     enum ad7173_filter_type filter_type;
+				bool bipolar;
+				bool input_buf;
+				u16 sinc3_odr_div;
+				u8 sinc5_odr_index;
+				u8 ref_sel;
+				enum ad7173_filter_type filter_type;
 			     }));
 
 	return cfg1->bipolar == cfg2->bipolar &&
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 3/3] iio: adc: ad7173: cleanup codestyle check and spell correct
  2026-04-13 13:42 [PATCH 0/3] iio: adc: ad7173: codestyle cleanup Sanjay Chitroda
  2026-04-13 13:42 ` [PATCH 1/3] iio: adc: ad7173: cleanup codestyle error Sanjay Chitroda
  2026-04-13 13:42 ` [PATCH 2/3] iio: adc: ad7173: cleanup codestyle warning(s) Sanjay Chitroda
@ 2026-04-13 13:42 ` Sanjay Chitroda
  2026-04-14  7:57   ` Andy Shevchenko
  2026-04-13 14:09 ` [PATCH 0/3] iio: adc: ad7173: codestyle cleanup David Lechner
  3 siblings, 1 reply; 8+ messages in thread
From: Sanjay Chitroda @ 2026-04-13 13:42 UTC (permalink / raw)
  To: lars, Michael.Hennerich, jic23
  Cc: dlechner, nuno.sa, andy, linux-iio, linux-kernel

From: Sanjay Chitroda <sanjayembeddedse@gmail.com>

Reported by checkpatch:
FILE: drivers/iio/adc/ad7173.c

CHECK: Avoid CamelCase: <AD7173_TEMP_SENSIIVITY_uV_per_C>

Signed-off-by: Sanjay Chitroda <sanjayembeddedse@gmail.com>
---
 drivers/iio/adc/ad7173.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/iio/adc/ad7173.c b/drivers/iio/adc/ad7173.c
index b9c563947e2e..2bb12dddc532 100644
--- a/drivers/iio/adc/ad7173.c
+++ b/drivers/iio/adc/ad7173.c
@@ -137,7 +137,7 @@
 #define AD7173_SETUP_REF_SEL_EXT_REF2	0x1
 #define AD7173_SETUP_REF_SEL_EXT_REF	0x0
 #define AD7173_VOLTAGE_INT_REF_uV	2500000
-#define AD7173_TEMP_SENSIIVITY_uV_per_C	477
+#define AD7173_TEMP_SENSITIVITY_UV_PER_C	477
 #define AD7177_ODR_START_VALUE		0x07
 #define AD4111_SHUNT_RESISTOR_OHM	50
 #define AD4111_DIVIDER_RATIO		10
@@ -1275,7 +1275,7 @@ static int ad7173_read_raw(struct iio_dev *indio_dev,
 		switch (chan->type) {
 		case IIO_TEMP:
 			temp = AD7173_VOLTAGE_INT_REF_uV * MILLI;
-			temp /= AD7173_TEMP_SENSIIVITY_uV_per_C;
+			temp /= AD7173_TEMP_SENSITIVITY_UV_PER_C;
 			*val = temp;
 			*val2 = chan->scan_type.realbits;
 			return IIO_VAL_FRACTIONAL_LOG2;
@@ -1300,7 +1300,7 @@ static int ad7173_read_raw(struct iio_dev *indio_dev,
 		case IIO_TEMP:
 			/* 0 Kelvin -> raw sample */
 			temp   = -ABSOLUTE_ZERO_MILLICELSIUS;
-			temp  *= AD7173_TEMP_SENSIIVITY_uV_per_C;
+			temp  *= AD7173_TEMP_SENSITIVITY_UV_PER_C;
 			temp <<= chan->scan_type.realbits;
 			temp   = DIV_U64_ROUND_CLOSEST(temp,
 						       AD7173_VOLTAGE_INT_REF_uV *
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 0/3] iio: adc: ad7173: codestyle cleanup
  2026-04-13 13:42 [PATCH 0/3] iio: adc: ad7173: codestyle cleanup Sanjay Chitroda
                   ` (2 preceding siblings ...)
  2026-04-13 13:42 ` [PATCH 3/3] iio: adc: ad7173: cleanup codestyle check and spell correct Sanjay Chitroda
@ 2026-04-13 14:09 ` David Lechner
  2026-04-14  7:55   ` Andy Shevchenko
  3 siblings, 1 reply; 8+ messages in thread
From: David Lechner @ 2026-04-13 14:09 UTC (permalink / raw)
  To: Sanjay Chitroda, lars, Michael.Hennerich, jic23
  Cc: nuno.sa, andy, linux-iio, linux-kernel

On 4/13/26 8:42 AM, Sanjay Chitroda wrote:
> From: Sanjay Chitroda <sanjayembeddedse@gmail.com>
> 
> Hi all,
> 
> This patch series clean up error, warning(s) and a check reported
> with checkpatch and no functional behavior changes are intended.

I'm pretty sure someone sent a series just like this already.

Patches 2 and 3 were rejected. Patch 1 is probably OK.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 0/3] iio: adc: ad7173: codestyle cleanup
  2026-04-13 14:09 ` [PATCH 0/3] iio: adc: ad7173: codestyle cleanup David Lechner
@ 2026-04-14  7:55   ` Andy Shevchenko
  0 siblings, 0 replies; 8+ messages in thread
From: Andy Shevchenko @ 2026-04-14  7:55 UTC (permalink / raw)
  To: David Lechner
  Cc: Sanjay Chitroda, lars, Michael.Hennerich, jic23, nuno.sa, andy,
	linux-iio, linux-kernel

On Mon, Apr 13, 2026 at 09:09:15AM -0500, David Lechner wrote:
> On 4/13/26 8:42 AM, Sanjay Chitroda wrote:

> > This patch series clean up error, warning(s) and a check reported
> > with checkpatch and no functional behavior changes are intended.
> 
> I'm pretty sure someone sent a series just like this already.
> 
> Patches 2 and 3 were rejected. Patch 1 is probably OK.

Seconded. NAK for patches 2 & 3 from me here.
Patch 1 is OK, though.

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 3/3] iio: adc: ad7173: cleanup codestyle check and spell correct
  2026-04-13 13:42 ` [PATCH 3/3] iio: adc: ad7173: cleanup codestyle check and spell correct Sanjay Chitroda
@ 2026-04-14  7:57   ` Andy Shevchenko
  2026-04-14 16:51     ` Sanjay Chitroda
  0 siblings, 1 reply; 8+ messages in thread
From: Andy Shevchenko @ 2026-04-14  7:57 UTC (permalink / raw)
  To: Sanjay Chitroda
  Cc: lars, Michael.Hennerich, jic23, dlechner, nuno.sa, andy,
	linux-iio, linux-kernel

On Mon, Apr 13, 2026 at 07:12:23PM +0530, Sanjay Chitroda wrote:

> Reported by checkpatch:
> FILE: drivers/iio/adc/ad7173.c
> 
> CHECK: Avoid CamelCase: <AD7173_TEMP_SENSIIVITY_uV_per_C>

Fix checkpatch, please, to make it understand the Système International d'unités.

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 3/3] iio: adc: ad7173: cleanup codestyle check and spell correct
  2026-04-14  7:57   ` Andy Shevchenko
@ 2026-04-14 16:51     ` Sanjay Chitroda
  0 siblings, 0 replies; 8+ messages in thread
From: Sanjay Chitroda @ 2026-04-14 16:51 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: lars, Michael.Hennerich, jic23, dlechner, nuno.sa, andy,
	linux-iio, linux-kernel



On 14 April 2026 1:27:43 pm IST, Andy Shevchenko <andriy.shevchenko@intel.com> wrote:
>On Mon, Apr 13, 2026 at 07:12:23PM +0530, Sanjay Chitroda wrote:
>
>> Reported by checkpatch:
>> FILE: drivers/iio/adc/ad7173.c
>> 
>> CHECK: Avoid CamelCase: <AD7173_TEMP_SENSIIVITY_uV_per_C>
>
>Fix checkpatch, please, to make it understand the Système International d'unités.
>

Hi Andy, 
Thank you for the valuable input.

KTODO: update checkpatch to understand system international d'units. 

e.g. Standard unit list:
Prefixes: u, m, k, M, G
Units: V, A, Hz, Ohm, C, K, s, W, etc.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-04-14 16:52 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-13 13:42 [PATCH 0/3] iio: adc: ad7173: codestyle cleanup Sanjay Chitroda
2026-04-13 13:42 ` [PATCH 1/3] iio: adc: ad7173: cleanup codestyle error Sanjay Chitroda
2026-04-13 13:42 ` [PATCH 2/3] iio: adc: ad7173: cleanup codestyle warning(s) Sanjay Chitroda
2026-04-13 13:42 ` [PATCH 3/3] iio: adc: ad7173: cleanup codestyle check and spell correct Sanjay Chitroda
2026-04-14  7:57   ` Andy Shevchenko
2026-04-14 16:51     ` Sanjay Chitroda
2026-04-13 14:09 ` [PATCH 0/3] iio: adc: ad7173: codestyle cleanup David Lechner
2026-04-14  7:55   ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox