[PATCH] hwmon: (aspeed-pwm-tacho) Use devm_platform_ioremap_resource() in aspeed_pwm_tacho_probe()

2019-09-18 Thread Markus Elfring
From: Markus Elfring Date: Wed, 18 Sep 2019 10:12:31 +0200 Simplify this function implementation by using a known wrapper function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/hwmon/aspeed-pwm-tacho.c | 7 +-- 1 file changed, 1

[PATCH 0/4] hwmon-NCT: Fine-tuning for four function implementations

2017-04-27 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 27 Apr 2017 11:18:22 +0200 A few update suggestions were taken into account from static source code analysis. Markus Elfring (4): Use devm_kcalloc() in nct6683_create_attr_group() Adjust five checks for null pointers Use devm_kcalloc() in

[PATCH 1/4] hwmon-nct6683: Use devm_kcalloc() in nct6683_create_attr_group()

2017-04-27 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 27 Apr 2017 10:10:36 +0200 Multiplications for the size determination of memory allocations indicated that array data structures should be processed. Thus use the corresponding function "devm_kcalloc". This issue was detected by using the Coccinell

[PATCH 2/4] hwmon-nct6683: Adjust five checks for null pointers

2017-04-27 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 27 Apr 2017 10:22:39 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The script “checkpatch.pl” pointed information out like the following. Comparison to NULL could be written … Thus fix the affected source code

[PATCH 3/4] hwmon-nct6775: Use devm_kcalloc() in nct6775_create_attr_group()

2017-04-27 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 27 Apr 2017 10:35:36 +0200 Multiplications for the size determination of memory allocations indicated that array data structures should be processed. Thus use the corresponding function "devm_kcalloc". This issue was detected by using the Coccinell

[PATCH 4/4] hwmon-nct6775: Adjust seven checks for null pointers

2017-04-27 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 27 Apr 2017 10:55:24 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The script “checkpatch.pl” pointed information out like the following. Comparison to NULL could be written … Thus fix the affected source code

Re: hwmon-NCT: Fine-tuning for four function implementations

2017-04-27 Thread SF Markus Elfring
Am 27.04.2017 um 14:50 schrieb Jean Delvare: > On Thu, 27 Apr 2017 11:27:21 +0200, SF Markus Elfring wrote: >> From: Markus Elfring >> Date: Thu, 27 Apr 2017 11:18:22 +0200 >> >> A few update suggestions were taken into account >> from static source code

[PATCH] hwmon/amc6821: Use common error handling code in amc6821_init_client()

2017-10-24 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 24 Oct 2017 22:04:20 +0200 * Add two jump targets so that a bit of exception handling can be better reused at the end of this function. This issue was detected by using the Coccinelle software. * Delete the local variable "err" which became u

Re: hwmon/amc6821: Use common error handling code in amc6821_init_client()

2017-10-24 Thread SF Markus Elfring
> Nack; I am not a friend of that much verboseness to start with, > and I don't think the patch improves readability. * Do you care to avoid code duplication for two error messages in this use case? * How do you think about to return a single error code directly without using an intermediate va

[PATCH] hwmon/sch5627: Use common error handling code in sch5627_probe()

2018-03-12 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 12 Mar 2018 22:15:59 +0100 Adjust jump targets so that a bit of exception handling can be better reused at the end of this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/hwmon/sch5627.c | 60

Re: hwmon/sch5627: Use common error handling code in sch5627_probe()

2018-03-13 Thread SF Markus Elfring
>> Adjust jump targets so that a bit of exception handling can be better >> reused at the end of this function. … > goto-s going to a label calling another goto is completely unreadable. I got an other software development view. > I really do not see any reason for the proposed changes, I sugge

Re: hwmon/sch5627: Use common error handling code in sch5627_probe()

2018-03-13 Thread SF Markus Elfring
>  1 file changed, 29 insertions(+), 31 deletions(-) > > So you are asking people to review 60 changed lines to save 2, A bit of object code reduction might become useful also in this case. > that alone should be the point where you stop yourself from > *even* sending this patch. I proposed ju

[PATCH] hwmon-ntc_thermistor: Delete an unnecessary check before the function call "iio_channel_release"

2016-07-18 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 18 Jul 2016 20:34:41 +0200 The iio_channel_release() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring

[PATCH] hwmon-SCPI: Delete unnecessary assignment for the field "owner"

2016-08-16 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 16 Aug 2016 15:17:13 +0200 The field "owner" is set by the core. Thus delete an unneeded initialisation. Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Markus Elfring --- drivers/hwmon/scpi-hwmon.c | 1 - 1 file