public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] hwmon: (aquacomputer_d5next) Fix alignment of function call params
@ 2023-04-09 18:35 Aleksa Savic
  2023-04-10 16:53 ` Guenter Roeck
  0 siblings, 1 reply; 5+ messages in thread
From: Aleksa Savic @ 2023-04-09 18:35 UTC (permalink / raw)
  To: linux-hwmon
  Cc: Aleksa Savic, Jack Doan, Jean Delvare, Guenter Roeck,
	Leonard Anderweit, linux-kernel

checkpatch warns that alignment of parameters of function call around
line 869 is off. Indent them properly.

Fixes: 6f5cdf9b9a86 ("hwmon: (aquacomputer_d5next) Add fan PWM control for Aquaero")
Signed-off-by: Aleksa Savic <savicaleksa83@gmail.com>
---
 drivers/hwmon/aquacomputer_d5next.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/hwmon/aquacomputer_d5next.c b/drivers/hwmon/aquacomputer_d5next.c
index 3bd35d833e69..7db7769fe044 100644
--- a/drivers/hwmon/aquacomputer_d5next.c
+++ b/drivers/hwmon/aquacomputer_d5next.c
@@ -867,8 +867,8 @@ static int aqc_read(struct device *dev, enum hwmon_sensor_types type, u32 attr,
 		switch (priv->kind) {
 		case aquaero:
 			ret = aqc_get_ctrl_val(priv,
-				AQUAERO_CTRL_PRESET_START + channel * AQUAERO_CTRL_PRESET_SIZE,
-				val, AQC_BE16);
+					       AQUAERO_CTRL_PRESET_START +
+					       channel * AQUAERO_CTRL_PRESET_SIZE, val, AQC_BE16);
 			if (ret < 0)
 				return ret;
 			*val = aqc_percent_to_pwm(*val);
-- 
2.39.2


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

* Re: [PATCH] hwmon: (aquacomputer_d5next) Fix alignment of function call params
  2023-04-09 18:35 [PATCH] hwmon: (aquacomputer_d5next) Fix alignment of function call params Aleksa Savic
@ 2023-04-10 16:53 ` Guenter Roeck
  2023-04-11 18:26   ` Aleksa Savic
  0 siblings, 1 reply; 5+ messages in thread
From: Guenter Roeck @ 2023-04-10 16:53 UTC (permalink / raw)
  To: Aleksa Savic
  Cc: linux-hwmon, Jack Doan, Jean Delvare, Leonard Anderweit,
	linux-kernel

On Sun, Apr 09, 2023 at 08:35:49PM +0200, Aleksa Savic wrote:
> checkpatch warns that alignment of parameters of function call around
> line 869 is off. Indent them properly.
> 
> Fixes: 6f5cdf9b9a86 ("hwmon: (aquacomputer_d5next) Add fan PWM control for Aquaero")
> Signed-off-by: Aleksa Savic <savicaleksa83@gmail.com>
> ---
>  drivers/hwmon/aquacomputer_d5next.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/hwmon/aquacomputer_d5next.c b/drivers/hwmon/aquacomputer_d5next.c
> index 3bd35d833e69..7db7769fe044 100644
> --- a/drivers/hwmon/aquacomputer_d5next.c
> +++ b/drivers/hwmon/aquacomputer_d5next.c
> @@ -867,8 +867,8 @@ static int aqc_read(struct device *dev, enum hwmon_sensor_types type, u32 attr,
>  		switch (priv->kind) {
>  		case aquaero:
>  			ret = aqc_get_ctrl_val(priv,
> -				AQUAERO_CTRL_PRESET_START + channel * AQUAERO_CTRL_PRESET_SIZE,
> -				val, AQC_BE16);
> +					       AQUAERO_CTRL_PRESET_START +
> +					       channel * AQUAERO_CTRL_PRESET_SIZE, val, AQC_BE16);

I am not sure I understand how this would improve readability.
It seems to accomplish the opposite. Sure, I know, checkpatch --strict
complains, but that is still better than unreadable code just to make
checkpatch happy.

Guenter

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

* Re: [PATCH] hwmon: (aquacomputer_d5next) Fix alignment of function call params
  2023-04-10 16:53 ` Guenter Roeck
@ 2023-04-11 18:26   ` Aleksa Savic
  2023-04-11 20:19     ` Guenter Roeck
  0 siblings, 1 reply; 5+ messages in thread
From: Aleksa Savic @ 2023-04-11 18:26 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: savicaleksa83, linux-hwmon, Jack Doan, Jean Delvare,
	Leonard Anderweit, linux-kernel

On 2023-04-10 18:53:08 GMT+02:00, Guenter Roeck wrote:
> 
> I am not sure I understand how this would improve readability.
> It seems to accomplish the opposite. Sure, I know, checkpatch --strict
> complains, but that is still better than unreadable code just to make
> checkpatch happy.
> 
> Guenter

Both seemed fine to me, the idea was to fix the checkpatch warning.
If it's OK for it to complain about this, plus the changes would make it
harder to read, please ignore this patch.

Thanks,
Aleksa

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

* Re: [PATCH] hwmon: (aquacomputer_d5next) Fix alignment of function call params
  2023-04-11 18:26   ` Aleksa Savic
@ 2023-04-11 20:19     ` Guenter Roeck
  2023-04-12  5:18       ` Aleksa Savic
  0 siblings, 1 reply; 5+ messages in thread
From: Guenter Roeck @ 2023-04-11 20:19 UTC (permalink / raw)
  To: Aleksa Savic
  Cc: linux-hwmon, Jack Doan, Jean Delvare, Leonard Anderweit,
	linux-kernel

On Tue, Apr 11, 2023 at 08:26:32PM +0200, Aleksa Savic wrote:
> On 2023-04-10 18:53:08 GMT+02:00, Guenter Roeck wrote:
> > 
> > I am not sure I understand how this would improve readability.
> > It seems to accomplish the opposite. Sure, I know, checkpatch --strict
> > complains, but that is still better than unreadable code just to make
> > checkpatch happy.
> > 
> > Guenter
> 
> Both seemed fine to me, the idea was to fix the checkpatch warning.
> If it's OK for it to complain about this, plus the changes would make it
> harder to read, please ignore this patch.
> 

checkpatch is useful, but not in situations where following its guidance
results in code which is diffficult to read. I run checkpatch --strict when
applying patches, so I do notice when it complains. If I want a report
to be addressed, I'll say that (such as, for example, when people are
overly generous with empty lines). If not, you can assume that I am ok with
the report and find it more important to have readable code than being
checkpatch-clean.

Guenter

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

* Re: [PATCH] hwmon: (aquacomputer_d5next) Fix alignment of function call params
  2023-04-11 20:19     ` Guenter Roeck
@ 2023-04-12  5:18       ` Aleksa Savic
  0 siblings, 0 replies; 5+ messages in thread
From: Aleksa Savic @ 2023-04-12  5:18 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: savicaleksa83, linux-hwmon, Jack Doan, Jean Delvare,
	Leonard Anderweit, linux-kernel

On 2023-04-11 22:19:21 GMT+02:00, Guenter Roeck wrote:
> On Tue, Apr 11, 2023 at 08:26:32PM +0200, Aleksa Savic wrote:
>> On 2023-04-10 18:53:08 GMT+02:00, Guenter Roeck wrote:
>>>
>>> I am not sure I understand how this would improve readability.
>>> It seems to accomplish the opposite. Sure, I know, checkpatch --strict
>>> complains, but that is still better than unreadable code just to make
>>> checkpatch happy.
>>>
>>> Guenter
>>
>> Both seemed fine to me, the idea was to fix the checkpatch warning.
>> If it's OK for it to complain about this, plus the changes would make it
>> harder to read, please ignore this patch.
>>
> 
> checkpatch is useful, but not in situations where following its guidance
> results in code which is diffficult to read. I run checkpatch --strict when
> applying patches, so I do notice when it complains. If I want a report
> to be addressed, I'll say that (such as, for example, when people are
> overly generous with empty lines). If not, you can assume that I am ok with
> the report and find it more important to have readable code than being
> checkpatch-clean.
> 
> Guenter

That clears it up, thanks!

Aleksa

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

end of thread, other threads:[~2023-04-12  5:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-09 18:35 [PATCH] hwmon: (aquacomputer_d5next) Fix alignment of function call params Aleksa Savic
2023-04-10 16:53 ` Guenter Roeck
2023-04-11 18:26   ` Aleksa Savic
2023-04-11 20:19     ` Guenter Roeck
2023-04-12  5:18       ` Aleksa Savic

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