From: Markus Elfring
Date: Thu, 19 Jan 2017 16:12:48 +0100
* Return directly after an inappropriate input parameter was detected.
* Delete an initialisation for the variable "tmp" at the beginning
which became unnecessary with this refactoring.
Signed-off-by: Markus Elfring
From: Markus Elfring
Date: Thu, 19 Jan 2017 15:55:36 +0100
A local variable was set to an error code before a concrete error situation
was detected. Thus move the corresponding assignment into an if branch
to indicate a software failure there.
This issue was detected by using the Coccinelle
From: Markus Elfring
Date: Thu, 19 Jan 2017 17:15:30 +0100
Replace the specification of data structures by references for local
variables as the parameter for the operator "sizeof" to make
the corresponding size determination a bit safer.
Signed-off-by: Markus Elfring
---
arch/powe
From: Markus Elfring
Date: Thu, 19 Jan 2017 17:27:37 +0100
A local variable was set to an error code before a concrete error situation
was detected. Thus move the corresponding assignment into an if branch
to indicate a software failure there.
Signed-off-by: Markus Elfring
---
arch/powerpc
From: Markus Elfring
Date: Thu, 19 Jan 2017 16:50:31 +0100
Return directly after a call of the function "kmalloc" failed here.
Signed-off-by: Markus Elfring
---
arch/powerpc/kernel/nvram_64.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/arch/powe
From: Markus Elfring
Date: Thu, 19 Jan 2017 15:22:56 +0100
* Return directly after an inappropriate input parameter was detected.
* Delete an initialisation for the variable "tmp" at the beginning
and an assignment for the variable "ret" which became unnecessary
w
From: Markus Elfring
Date: Thu, 19 Jan 2017 21:20:09 +0100
A local variable was set to an error code before a concrete error situation
was detected. Thus move the corresponding assignment into an if branch
to indicate a software failure there.
This issue was detected by using the Coccinelle
> I think you really could have squashed patches 1-3 into a single patch
> that returns directly after any failure.
Thanks for your constructive feedback.
I have got software development concerns around such patch squashing.
> At this point you might as well remove that label and move the kfree
From: Markus Elfring
Date: Fri, 20 Jan 2017 19:07:21 +0100
Some update suggestions were taken into account
from static source code analysis.
Markus Elfring (11):
Move assignments for the variable "err" in kvm_htab_write()
Improve a size determination in kvmppc_alloc_hpt()
Move
From: Markus Elfring
Date: Thu, 19 Jan 2017 22:45:56 +0100
* A local variable was set to an error code in five cases
before a concrete error situation was detected.
Thus move the corresponding assignments into
if branches to indicate a software failure there.
This issue was detected by
From: Markus Elfring
Date: Fri, 20 Jan 2017 10:00:13 +0100
Replace the specification of a data structure by a pointer dereference
as the parameter for the operator "sizeof" to make the corresponding size
determination a bit safer according to the Linux coding style convention.
Sig
From: Markus Elfring
Date: Fri, 20 Jan 2017 10:30:26 +0100
A local variable was set to an error code in a few cases before a concrete
error situation was detected. Thus move the corresponding assignments into
if branches to indicate a software failure there.
This issue was detected by using the
From: Markus Elfring
Date: Fri, 20 Jan 2017 11:00:08 +0100
Add a jump target so that a bit of exception handling can be better reused
at the end of this function.
Signed-off-by: Markus Elfring
---
arch/powerpc/kvm/book3s_hv.c | 8 +++-
1 file changed, 3 insertions(+), 5 deletions(-)
diff
From: Markus Elfring
Date: Fri, 20 Jan 2017 11:25:48 +0100
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 affected source c
From: Markus Elfring
Date: Fri, 20 Jan 2017 16:20:43 +0100
* A multiplication for the size determination of a memory allocation
indicated that an array data structure should be processed.
Thus use the corresponding function "kcalloc".
This issue was detected by using the
From: Markus Elfring
Date: Fri, 20 Jan 2017 16:23:30 +0100
Replace the specification of data structures by pointer dereferences
as the parameter for the operator "sizeof" to make the corresponding size
determination a bit safer according to the Linux coding style convention.
Sig
From: Markus Elfring
Date: Fri, 20 Jan 2017 16:26:51 +0100
A string which did not contain data format specifications should be put
into a sequence. Thus use the corresponding function "seq_puts".
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring
From: Markus Elfring
Date: Fri, 20 Jan 2017 16:28:43 +0100
Replace the specification of data structures by pointer dereferences
as the parameter for the operator "sizeof" to make the corresponding size
determination a bit safer according to the Linux coding style convention.
Sig
From: Markus Elfring
Date: Fri, 20 Jan 2017 16:30:18 +0100
* A multiplication for the size determination of a memory allocation
indicated that an array data structure should be processed.
Thus use the corresponding function "kcalloc".
This issue was detected by using the
From: Markus Elfring
Date: Fri, 20 Jan 2017 18:00:35 +0100
* Return directly after a call of the function "copy_from_user"
(or two other checks) failed in a case block.
This issue was detected by using the Coccinelle software.
* Delete the jump label "out" which bec
From: Markus Elfring
Date: Sat, 21 Jan 2017 15:30:15 +0100
* Return directly after a call of the function "address_ok" failed
in a case block.
This issue was detected by using the Coccinelle software.
* Delete two error code assignments which became unnecessary with
this r
From: Markus Elfring
Date: Sat, 21 Jan 2017 16:10:50 +0100
* Return directly after a call of the function "__copy_from_user"
failed here.
This issue was detected by using the Coccinelle software.
* Delete the jump label "out2" which became unnecessary with
this refa
> Some observations:
>
> o Your patch fixes no bug nor replaces any depreciated feature.
How do you think about information from the section “14) Allocating memory”
in the document “coding-style.rst” for the shown source code transformation?
> o There will be no functional change; …
Yes. - T
From: Markus Elfring
Date: Fri, 29 Dec 2017 15:47:00 +0100
Omit extra messages for a memory allocation failure in these functions.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring
---
drivers/pci/hotplug/pciehp_hpc.c | 5 ++---
drivers/pci/hotplug
From: Markus Elfring
Date: Sat, 30 Dec 2017 22:25:44 +0100
Omit an extra message for a memory allocation failure in this function.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring
---
drivers/net/wan/fsl_ucc_hdlc.c | 1 -
1 file changed, 1 deletion
From: Markus Elfring
Date: Wed, 3 Jan 2018 14:50:59 +0100
Omit an extra message for a memory allocation failure in this function.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring
---
drivers/net/ethernet/toshiba/ps3_gelic_net.c | 2 --
1 file changed, 2
From: Markus Elfring
Date: Sun, 7 Jan 2018 10:07:36 +0100
A headline should be quickly put into a sequence. Thus use the
function "seq_puts" instead of "seq_printf" for this purpose.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring
-
From: Markus Elfring
Date: Thu, 11 Jan 2018 18:48:28 +0100
A few update suggestions were taken into account
from static source code analysis.
Markus Elfring (5):
Combine four seq_printf() calls into two in ocm_debugfs_show()
Use seq_putc() in ocm_debugfs_show()
Delete an error message for
From: Markus Elfring
Date: Thu, 11 Jan 2018 18:08:08 +0100
Some data were printed into a sequence by four separate function calls.
Print the same data by two single function calls instead.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring
---
arch
From: Markus Elfring
Date: Thu, 11 Jan 2018 18:10:02 +0100
A single character (line break) should be put into a sequence.
Thus use the corresponding function "seq_putc".
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring
---
arch/powerpc/pla
From: Markus Elfring
Date: Thu, 11 Jan 2018 18:28:54 +0100
Omit an extra message for a memory allocation failure in these functions.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring
---
arch/powerpc/platforms/4xx/msi.c | 5 ++---
arch/powerpc/platforms
From: Markus Elfring
Date: Thu, 11 Jan 2018 18:40:23 +0100
The script "checkpatch.pl" pointed information out like the following.
WARNING: void function return statements are not generally useful
Thus remove such a statement in the affected functions.
Signed-off-by: Markus Elfring
From: Markus Elfring
Date: Thu, 11 Jan 2018 18:32:33 +0100
Replace the specification of data structures by pointer dereferences
as the parameter for the operator "sizeof" to make the corresponding size
determination a bit safer according to the Linux coding style convention.
This
From: Markus Elfring
Date: Tue, 16 Jan 2018 21:36:56 +0100
Two update suggestions were taken into account
from static source code analysis.
Markus Elfring (2):
Delete an error message for a failed memory allocation
Improve a size determination
drivers/macintosh/rack-meter.c | 3 +--
1
From: Markus Elfring
Date: Tue, 16 Jan 2018 21:23:36 +0100
Omit an extra message for a memory allocation failure in this function.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring
---
drivers/macintosh/rack-meter.c | 1 -
1 file changed, 1 deletion
From: Markus Elfring
Date: Tue, 16 Jan 2018 21:26:52 +0100
Replace the specification of a data structure by a pointer dereference
as the parameter for the operator "sizeof" to make the corresponding size
determination a bit safer according to the Linux coding style convention.
This
From: Markus Elfring
Date: Wed, 14 Feb 2018 17:05:13 +0100
Omit an extra message for a memory allocation failure in this function.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring
---
drivers/crypto/nx/nx-842-pseries.c | 5 ++---
1 file changed, 2
From: Markus Elfring
Date: Sun, 11 Mar 2018 09:03:42 +0100
Add a jump target 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
---
arch/powerpc/kernel
From: Markus Elfring
Date: Wed, 20 Jul 2016 15:10:32 +0200
The of_node_put() 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
From: Markus Elfring
Date: Sun, 14 Aug 2016 21:42:17 +0200
The field "owner" is set by core. Thus delete an extra initialisation.
Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci
Signed-off-by: Markus Elfring
---
drivers/macintosh/ams/ams-i2c.c| 1 -
drivers
From: Markus Elfring
Date: Mon, 15 Aug 2016 22:07:54 +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
---
arch/powerpc/platforms/512x/mpc512x_lpbfifo.
From: Markus Elfring
Date: Mon, 15 Aug 2016 22:36:05 +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
---
arch/powerpc/platforms/83xx/mcu_mpc8349emitx.
From: Markus Elfring
Date: Wed, 24 Aug 2016 22:26:37 +0200
A multiplication for the size determination of a memory allocation
indicated that an array data structure should be processed.
Thus reuse the corresponding function "kmalloc_array".
This issue was detected by using the
From: Markus Elfring
Date: Sun, 28 Aug 2016 19:01:02 +0200
Several update suggestions were taken into account
from static source code analysis.
Markus Elfring (6):
Use kmalloc_array() in kvm_vcpu_ioctl_config_tlb()
Less function calls in kvm_vcpu_ioctl_config_tlb() after error detection
From: Markus Elfring
Date: Sun, 28 Aug 2016 17:34:46 +0200
The kfree() function was called in two cases by the
kvm_vcpu_ioctl_config_tlb() function during error handling
even if the passed data structure element contained a null pointer.
* Split a condition check for memory allocation failures
From: Markus Elfring
Date: Sun, 28 Aug 2016 18:30:38 +0200
* A multiplication for the size determination of a memory allocation
indicated that an array data structure should be processed.
Thus use the corresponding function "kcalloc".
Suggested-by: Paolo Bonzini
This
From: Markus Elfring
Date: Sun, 28 Aug 2016 18:40:08 +0200
* A multiplication for the size determination of a memory allocation
indicated that an array data structure should be processed.
Thus use the corresponding function "kmalloc_array".
* Replace the specification of a data st
From: Markus Elfring
Date: Sun, 28 Aug 2016 16:30:07 +0200
* A multiplication for the size determination of a memory allocation
indicated that an array data structure should be processed.
Thus use the corresponding function "kmalloc_array".
This issue was detected by using the
From: Markus Elfring
Date: Sun, 28 Aug 2016 18:45:26 +0200
Adjust jump labels according to the current Linux coding style convention.
Signed-off-by: Markus Elfring
---
arch/powerpc/kvm/e500_mmu.c | 9 -
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/arch/powerpc/kvm
From: Markus Elfring
Date: Sun, 28 Aug 2016 17:37:10 +0200
The local variable "g2h_bitmap" will be set to an appropriate value
a bit later. Thus omit the explicit initialisation at the beginning.
Signed-off-by: Markus Elfring
---
arch/powerpc/kvm/e500_mmu.c | 2 +-
1 file changed, 1
From: Markus Elfring
Date: Mon, 29 Aug 2016 07:50:33 +0200
* A multiplication for the size determination of a memory allocation
indicated that an array data structure should be processed.
Thus use the corresponding function "kmalloc_array".
This issue was detected by using the
From: Markus Elfring
Date: Mon, 29 Aug 2016 11:44:22 +0200
Some update suggestions were taken into account
from static source code analysis.
Markus Elfring (5):
Use kmalloc_array() in mpic_init()
Use kmalloc_array() in ppc4xx_setup_msi_irqs()
Use kmalloc_array() in hsta_msi_probe
From: Markus Elfring
Date: Mon, 29 Aug 2016 11:44:22 +0200
Some update suggestions were taken into account
from static source code analysis.
Markus Elfring (5):
Use kmalloc_array() in mpic_init()
Use kmalloc_array() in ppc4xx_setup_msi_irqs()
Use kmalloc_array() in hsta_msi_probe
From: Markus Elfring
Date: Mon, 29 Aug 2016 11:00:11 +0200
A multiplication for the size determination of a memory allocation
indicated that an array data structure should be processed.
Thus use the corresponding function "kmalloc_array".
This issue was detected by using the Coccinell
From: Markus Elfring
Date: Mon, 29 Aug 2016 11:11:24 +0200
* A multiplication for the size determination of a memory allocation
indicated that an array data structure should be processed.
Thus use the corresponding function "kmalloc_array".
This issue was detected by using the
From: Markus Elfring
Date: Mon, 29 Aug 2016 11:20:39 +0200
* A multiplication for the size determination of a memory allocation
indicated that an array data structure should be processed.
Thus use the corresponding function "kmalloc_array".
This issue was detected by using the
From: Markus Elfring
Date: Mon, 29 Aug 2016 11:22:19 +0200
Adjust jump labels according to the current Linux coding style convention.
Signed-off-by: Markus Elfring
---
arch/powerpc/sysdev/ppc4xx_hsta_msi.c | 15 ++-
1 file changed, 6 insertions(+), 9 deletions(-)
diff --git a
From: Markus Elfring
Date: Mon, 29 Aug 2016 11:30:48 +0200
Move the assignments for three data structure members to the end
so that they will only be performed if the desired resource allocations
succeeded by this function.
Signed-off-by: Markus Elfring
---
arch/powerpc/sysdev
From: Markus Elfring
Date: Mon, 12 Sep 2016 22:33:53 +0200
Adjust jump labels according to the current Linux coding style convention.
Signed-off-by: Markus Elfring
---
Thanks that five update steps could be integrated into the branch "kvm-ppc-next"
of another source code repository
From: Markus Elfring
Date: Thu, 3 Aug 2017 21:02:02 +0200
A few update suggestions were taken into account
from static source code analysis.
Markus Elfring (4):
Delete an error message for a failed memory allocation
Improve a size determination in axon_ram_probe()
Return directly after a
From: Markus Elfring
Date: Thu, 3 Aug 2017 19:49:18 +0200
Omit an extra message for a memory allocation failure in this function.
This issue was detected by using the Coccinelle software.
Link:
http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf
From: Markus Elfring
Date: Thu, 3 Aug 2017 20:23:57 +0200
* Return directly after a call of the function "kzalloc" failed
at the beginning.
* Delete a repeated check for the local variable "bank"
which became unnecessary with this refactoring.
Signed-off-by: Marku
From: Markus Elfring
Date: Thu, 3 Aug 2017 20:34:00 +0200
The local variable "rc" will eventually be set only to an error code.
Thus omit the explicit initialisation at the beginning.
Signed-off-by: Markus Elfring
---
arch/powerpc/sysdev/axonram.c | 1 -
1 file changed, 1 deletio
From: Markus Elfring
Date: Thu, 3 Aug 2017 20:00:16 +0200
Replace the specification of a data structure by a pointer dereference
as the parameter for the operator "sizeof" to make the corresponding size
determination a bit safer according to the Linux coding style convention.
Sig
From: Markus Elfring
Date: Fri, 4 Aug 2017 16:37:56 +0200
Omit an extra message for a memory allocation failure in these functions.
This issue was detected by using the Coccinelle software.
Link:
http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf
From: Markus Elfring
Date: Mon, 7 Aug 2017 12:37:01 +0200
Omit an extra message for a memory allocation failure in this function.
This issue was detected by using the Coccinelle software.
Link:
http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf
>> Omit an extra message for a memory allocation failure in this function.
>>
>> This issue was detected by using the Coccinelle software.
>
> NACK
>
> When a user asks me for help I would certainly like to get
> 'Could not allocate cache tags' as apposed to nothing,
Do you find the default all
>> Do you find the default allocation failure report insufficient?
>
> The default is OK.
Thanks for this information.
> I didn't consider one would be triggered by the kzalloc failure.
Do you reconsider any special system settings for further
software evolution then?
Regards,
Markus
>>> I didn't consider one would be triggered by the kzalloc failure.
>>
>> Do you reconsider any special system settings for further
>> software evolution then?
>
> Sorry, I don't quite understand your question.
Do you try to configure the Linux error reporting to any special needs?
> I think y
>> https://patchwork.ozlabs.org/patch/798575/
>
> I submitted your patch
Thanks for your constructive feedback.
https://patchwork.ozlabs.org/patch/798850/
> and a fix to ps3vram_probe() with the other patches in my queue.
I find it nice that you picked this change opportunity up after
a bit of
> @@ -741,7 +741,11 @@ static int ps3vram_probe(struct ps3_system_bus_device
> *dev)
> goto out_unmap_reports;
> }
>
> - ps3vram_cache_init(dev);
> + error = ps3vram_cache_init(dev);
> + if (error < 0) {
> + goto out_unmap_reports;
> + }
> +
>
>From 885ccd6c63291dcd4854a0cbaab5188cdc3db805 Mon Sep 17 00:00:00 2001
From: Markus Elfring
Date: Fri, 11 Aug 2017 15:10:43 +0200
Subject: [PATCH] ASoC: Freescale: Delete an error message for a failed memory
allocation in three functions
Omit an extra message for a memory allocation failure
From: Markus Elfring
Date: Sun, 27 Aug 2017 22:00:22 +0200
Omit an extra message for a memory allocation failure in this function.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring
---
drivers/leds/leds-powernv.c | 6 +-
1 file changed, 1 insertion
> Series applied to powerpc next, thanks.
Thanks for another positive feedback.
But I wonder how you can refer to the “series” when the forth update step
“Delete an unnecessary variable initialisation” contained a broken suggestion.
> https://git.kernel.org/powerpc/c/a1bddf3991573f3dff2762bfca5
> Applied to powerpc next, thanks.
>
> https://git.kernel.org/powerpc/c/6ab41161b44a3b4d504ac29c9dd997
Thanks that you picked another update suggestion up.
* It might matter to mention that only one patch hunk was accepted in this case.
* Can it be that the adjusted commit subject does contain
From: Markus Elfring
Date: Tue, 5 Sep 2017 18:47:02 +0200
The local variable "rc" will eventually be set only to an error code.
Thus omit the explicit initialisation at the beginning.
Signed-off-by: Markus Elfring
---
v2:
Three update steps were integrated for this software module
201 - 276 of 276 matches
Mail list logo