From: Markus Elfring elfr...@users.sourceforge.net
Date: Fri, 21 Nov 2014 12:40:32 +0100
The tty_kref_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.
From: Markus Elfring elfr...@users.sourceforge.net
Date: Sat, 22 Nov 2014 16:18:20 +0100
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.
From: Markus Elfring elfr...@users.sourceforge.net
Date: Tue, 2 Dec 2014 22:50:24 +0100
The release_and_free_resource() 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.
From: Markus Elfring elfr...@users.sourceforge.net
Date: Wed, 4 Feb 2015 21:32:27 +0100
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.
From: Markus Elfring elfr...@users.sourceforge.net
Date: Tue, 3 Feb 2015 13:55:53 +0100
The kfree() 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:
From: Markus Elfring elfr...@users.sourceforge.net
Date: Tue, 3 Feb 2015 14:34:10 +0100
The kfree() 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:
From: Markus Elfring elfr...@users.sourceforge.net
Date: Sat, 3 Jan 2015 20:43:01 +0100
The snd_pcm_suspend_all() 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.
From: Markus Elfring elfr...@users.sourceforge.net
Date: Sat, 3 Jan 2015 22:55:54 +0100
The iounmap() function performs also input parameter validation.
Thus the test around the call is not needed.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring
Am 04.02.2015 um 21:36 schrieb SF Markus Elfring:
From: Markus Elfring elfr...@users.sourceforge.net
Date: Wed, 4 Feb 2015 21:32:27 +0100
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
From: Markus Elfring
Date: Fri, 6 Nov 2015 11:00:23 +0100
The kfree() 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:
From: Markus Elfring
Date: Mon, 14 Dec 2015 23:01:32 +0100
A status check was performed by the fsl_get_immr() function even if it
was known already that a system setting did not fit to the expectations.
This implementation detail could be improved by an adjustment
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
---
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.
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
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
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
From: Markus Elfring
Date: Thu, 19 Jan 2017 15:44:03 +0100
Return directly after a call of the function "kmalloc" failed here.
Signed-off-by: Markus Elfring
---
arch/powerpc/kernel/nvram_64.c | 4 +---
1 file changed, 1
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
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
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.
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
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
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
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
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
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
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.
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
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
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"
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
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
From: Markus Elfring
Date: Thu, 19 Jan 2017 16:56:46 +0100
The script "checkpatch.pl" pointed information out like the following.
WARNING: Possible unnecessary 'out of memory' message
Thus fix affected source code places.
Signed-off-by: Markus Elfring
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:
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:
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
From: Markus Elfring
Date: Thu, 19 Jan 2017 17:41:23 +0100
Some update suggestions were taken into account
from static source code analysis.
Markus Elfring (8):
Return directly after a failed parameter validation in dev_nvram_write()
Return directly after a
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
> 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
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
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
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
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
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
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
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
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
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
---
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
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
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
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
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
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
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
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
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
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
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:
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
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:
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
---
>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
>> 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
> @@ -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;
> + }
> +
>
>> 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
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:
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:
>> 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
From: Markus Elfring
Date: Sun, 7 May 2017 16:32:04 +0200
Two single characters (line breaks) 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
From: Markus Elfring
Date: Thu, 5 Oct 2017 13:16:51 +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
---
From: Markus Elfring
Date: Thu, 5 Oct 2017 18:02:05 +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
---
From: Markus Elfring
Date: Thu, 5 Oct 2017 17:18:33 +0200
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
From: Markus Elfring
Date: Thu, 5 Oct 2017 17:32:10 +0200
Two update suggestions were taken into account
from static source code analysis.
Markus Elfring (2):
Delete an error message for a failed memory allocation in three functions
Improve a size
From: Markus Elfring
Date: Thu, 5 Oct 2017 17:10:11 +0200
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
---
From: Markus Elfring
Date: Mon, 16 Oct 2017 19:12:34 +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
in tpm_ascii_bios_measurements_show()
From: Markus Elfring
Date: Mon, 16 Oct 2017 19:00:34 +0200
Two pointer checks could be repeated by the tpm_ibmvtpm_probe() function
during error handling even if the relevant properties can be determined
for the involved variables before by source code analysis.
*
From: Markus Elfring
Date: Mon, 16 Oct 2017 17:43:55 +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
---
From: Markus Elfring
Date: Mon, 16 Oct 2017 18:08:23 +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
---
From: Markus Elfring
Date: Mon, 16 Oct 2017 18:28:17 +0200
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
>> A minor complaint: all commits are missing "Fixes:" tag.
>
> None of these patches fix anything.
It depends on the view which you prefer.
> All are trivial changes without much of any impact.
I find that they improve the affected software another bit.
Other adjustments can be more
> Fixes is only for bug fixes. These don't fix any bugs.
How do you distinguish these in questionable source code
from other error categories or software weaknesses?
Regards,
Markus
From: Markus Elfring
Date: Tue, 17 Oct 2017 13:45:54 +0200
Three update suggestions were taken into account
from static source code analysis.
Markus Elfring (3):
Delete ten error messages for a failed memory allocation
Improve 12 size determinations
Fix a
From: Markus Elfring
Date: Tue, 17 Oct 2017 13:31:42 +0200
Fix a word in these descriptions.
Signed-off-by: Markus Elfring
---
arch/powerpc/platforms/powernv/opal-hmi.c | 2 +-
From: Markus Elfring
Date: Tue, 17 Oct 2017 12:21:40 +0200
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
---
From: Markus Elfring
Date: Tue, 17 Oct 2017 13:20:19 +0200
Replace the specification of data types by variable references
as the parameter for the operator "sizeof" to make the corresponding size
determination a bit safer according to the Linux coding style
From: Markus Elfring
Date: Tue, 17 Oct 2017 17:27:37 +0200
Three update suggestions were taken into account
from static source code analysis.
Markus Elfring (3):
Delete an error message for a failed memory allocation in
pnv_ioda_pick_m64_pe()
Use common code
From: Markus Elfring
Date: Tue, 17 Oct 2017 16:52:43 +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
---
From: Markus Elfring
Date: Tue, 17 Oct 2017 17:07:54 +0200
Add a jump target so that a bit of code can be better reused
at the end of this function.
Signed-off-by: Markus Elfring
---
arch/powerpc/platforms/powernv/pci-ioda.c | 10
From: Markus Elfring
Date: Tue, 17 Oct 2017 17:18:10 +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
> A minor complaint: all commits are missing "Fixes:" tag.
* Do you require it to be added to the commit messages?
* Would you like to get a finer patch granularity then?
* Do you find any more information missing?
Regards,
Markus
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
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
---
> 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.
>
> 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: Thu, 5 Oct 2017 21:04:30 +0200
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
---
From: Markus Elfring
Date: Thu, 5 Oct 2017 21:25:43 +0200
Two update suggestions were taken into account
from static source code analysis.
Markus Elfring (2):
Delete an error message for a failed memory allocation in three functions
Improve a size
From: Markus Elfring
Date: Thu, 5 Oct 2017 21:12:41 +0200
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
From: Markus Elfring
Date: Thu, 5 Oct 2017 22:48:22 +0200
Two update suggestions were taken into account
from static source code analysis.
Markus Elfring (2):
Delete an error message for a failed memory allocation in kw_i2c_host_init()
Improve a size
1 - 100 of 163 matches
Mail list logo