linux-hwmon.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drivers/hwmon/dell-smm-hwmon.c: fix blank line
@ 2020-03-31 22:57 Michele Sorcinelli
  2020-03-31 23:02 ` Pali Rohár
  0 siblings, 1 reply; 4+ messages in thread
From: Michele Sorcinelli @ 2020-03-31 22:57 UTC (permalink / raw)
  To: Pali Rohár
  Cc: Jean Delvare, Guenter Roeck, linux-hwmon, Michele Sorcinelli

Fix missing blank line after declaration: reported by checkpatch.pl

There are other missing blank lines reported in the declaration of
struct smm_regs fields (line 120) but they are probably false positives
so I don't think they need to be changed.

Signed-off-by: Michele Sorcinelli <michelesr@autistici.org>
---
 drivers/hwmon/dell-smm-hwmon.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/hwmon/dell-smm-hwmon.c b/drivers/hwmon/dell-smm-hwmon.c
index ab719d372b0d..7b61b613aff6 100644
--- a/drivers/hwmon/dell-smm-hwmon.c
+++ b/drivers/hwmon/dell-smm-hwmon.c
@@ -1276,6 +1276,7 @@ static int __init i8k_probe(void)
 	id = dmi_first_match(i8k_dmi_table);
 	if (id && id->driver_data) {
 		const struct i8k_config_data *conf = id->driver_data;
+
 		if (!fan_mult && conf->fan_mult)
 			fan_mult = conf->fan_mult;
 		if (!fan_max && conf->fan_max)
-- 
2.26.0


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

* Re: [PATCH] drivers/hwmon/dell-smm-hwmon.c: fix blank line
  2020-03-31 22:57 [PATCH] drivers/hwmon/dell-smm-hwmon.c: fix blank line Michele Sorcinelli
@ 2020-03-31 23:02 ` Pali Rohár
  2020-03-31 23:07   ` Michele Sorcinelli
  2020-04-01  2:31   ` Guenter Roeck
  0 siblings, 2 replies; 4+ messages in thread
From: Pali Rohár @ 2020-03-31 23:02 UTC (permalink / raw)
  To: Michele Sorcinelli; +Cc: Jean Delvare, Guenter Roeck, linux-hwmon

On Tuesday 31 March 2020 23:57:08 Michele Sorcinelli wrote:
> Fix missing blank line after declaration: reported by checkpatch.pl
> 
> There are other missing blank lines reported in the declaration of
> struct smm_regs fields (line 120) but they are probably false positives
> so I don't think they need to be changed.
> 
> Signed-off-by: Michele Sorcinelli <michelesr@autistici.org>

Hello! I'm fine with any coding style which is consistent. With or also
without this blank line. So if Jean and Guenter as subsystem maintainers
want this change I'm fine with it too and in this case you can add my
Acked-by: Pali Rohár <pali@kernel.org>

> ---
>  drivers/hwmon/dell-smm-hwmon.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/hwmon/dell-smm-hwmon.c b/drivers/hwmon/dell-smm-hwmon.c
> index ab719d372b0d..7b61b613aff6 100644
> --- a/drivers/hwmon/dell-smm-hwmon.c
> +++ b/drivers/hwmon/dell-smm-hwmon.c
> @@ -1276,6 +1276,7 @@ static int __init i8k_probe(void)
>  	id = dmi_first_match(i8k_dmi_table);
>  	if (id && id->driver_data) {
>  		const struct i8k_config_data *conf = id->driver_data;
> +
>  		if (!fan_mult && conf->fan_mult)
>  			fan_mult = conf->fan_mult;
>  		if (!fan_max && conf->fan_max)
> -- 
> 2.26.0
> 

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

* Re: [PATCH] drivers/hwmon/dell-smm-hwmon.c: fix blank line
  2020-03-31 23:02 ` Pali Rohár
@ 2020-03-31 23:07   ` Michele Sorcinelli
  2020-04-01  2:31   ` Guenter Roeck
  1 sibling, 0 replies; 4+ messages in thread
From: Michele Sorcinelli @ 2020-03-31 23:07 UTC (permalink / raw)
  To: Pali Rohár; +Cc: Jean Delvare, Guenter Roeck, linux-hwmon

On 4/1/20 12:02 AM, Pali Rohár wrote:

> Hello! I'm fine with any coding style which is consistent. With or also
> without this blank line. So if Jean and Guenter as subsystem maintainers
> want this change I'm fine with it too and in this case you can add my
> Acked-by: Pali Rohár <pali@kernel.org>

I'm just wandering why this warnings are appearing?

WARNING: Missing a blank line after declarations
#122: FILE: drivers/hwmon/dell-smm-hwmon.c:122:
+       unsigned int eax;
+       unsigned int ebx __packed;

WARNING: Missing a blank line after declarations
#123: FILE: drivers/hwmon/dell-smm-hwmon.c:123:
+       unsigned int ebx __packed;
+       unsigned int ecx __packed;

WARNING: Missing a blank line after declarations
#124: FILE: drivers/hwmon/dell-smm-hwmon.c:124:
+       unsigned int ecx __packed;
+       unsigned int edx __packed;

WARNING: Missing a blank line after declarations
#125: FILE: drivers/hwmon/dell-smm-hwmon.c:125:
+       unsigned int edx __packed;
+       unsigned int esi __packed;

WARNING: Missing a blank line after declarations
#126: FILE: drivers/hwmon/dell-smm-hwmon.c:126:
+       unsigned int esi __packed;
+       unsigned int edi __packed;

They definitely look false positives, so maybe this behavior should be reported
to the maintainers of the checkpatch.pl script?

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

* Re: [PATCH] drivers/hwmon/dell-smm-hwmon.c: fix blank line
  2020-03-31 23:02 ` Pali Rohár
  2020-03-31 23:07   ` Michele Sorcinelli
@ 2020-04-01  2:31   ` Guenter Roeck
  1 sibling, 0 replies; 4+ messages in thread
From: Guenter Roeck @ 2020-04-01  2:31 UTC (permalink / raw)
  To: Pali Rohár, Michele Sorcinelli; +Cc: Jean Delvare, linux-hwmon

On 3/31/20 4:02 PM, Pali Rohár wrote:
> On Tuesday 31 March 2020 23:57:08 Michele Sorcinelli wrote:
>> Fix missing blank line after declaration: reported by checkpatch.pl
>>
>> There are other missing blank lines reported in the declaration of
>> struct smm_regs fields (line 120) but they are probably false positives
>> so I don't think they need to be changed.
>>
>> Signed-off-by: Michele Sorcinelli <michelesr@autistici.org>
> 
> Hello! I'm fine with any coding style which is consistent. With or also
> without this blank line. So if Jean and Guenter as subsystem maintainers
> want this change I'm fine with it too and in this case you can add my
> Acked-by: Pali Rohár <pali@kernel.org>

I'll have to think about it. I don't mind cleanup patches as part of
a patch series that actually improves something, but standalone patches
like this are pretty much pointless and only a source of future failed
backports (and, yes, my thinking on this has evolved over time).

Guenter

> 
>> ---
>>  drivers/hwmon/dell-smm-hwmon.c | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/hwmon/dell-smm-hwmon.c b/drivers/hwmon/dell-smm-hwmon.c
>> index ab719d372b0d..7b61b613aff6 100644
>> --- a/drivers/hwmon/dell-smm-hwmon.c
>> +++ b/drivers/hwmon/dell-smm-hwmon.c
>> @@ -1276,6 +1276,7 @@ static int __init i8k_probe(void)
>>  	id = dmi_first_match(i8k_dmi_table);
>>  	if (id && id->driver_data) {
>>  		const struct i8k_config_data *conf = id->driver_data;
>> +
>>  		if (!fan_mult && conf->fan_mult)
>>  			fan_mult = conf->fan_mult;
>>  		if (!fan_max && conf->fan_max)
>> -- 
>> 2.26.0
>>


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

end of thread, other threads:[~2020-04-01  2:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-31 22:57 [PATCH] drivers/hwmon/dell-smm-hwmon.c: fix blank line Michele Sorcinelli
2020-03-31 23:02 ` Pali Rohár
2020-03-31 23:07   ` Michele Sorcinelli
2020-04-01  2:31   ` Guenter Roeck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).