From: Markus Elfring
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.
Signed-off-by: Markus Elfring
---
driv
From: Markus Elfring
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.
Signed-off-by: Markus Elfring
---
arch/
From: Markus Elfring
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.
Signed-off-by: Markus Elfrin
From: Markus Elfring
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.
Signed-off-by: Markus Elfring
---
From: Markus Elfring
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
---
sound/aoa/soundbus/i2sbus/core.c
Am 04.02.2015 um 21:36 schrieb SF Markus Elfring:
> From: Markus Elfring
> 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
From: Markus Elfring
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: Markus Elfring
---
arch/powerpc
From: Markus Elfring
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: Markus Elfring
---
arch/powerpc
From: Markus Elfring
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.
Signed-off-by: Markus Elfring
---
driver
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: Markus Elfring
---
drivers/misc
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 for
a jump label according to t
How do you think about to add any more meta-data for this semantic patch script?
* SPDX identifier
* Copyright information
* Confidence level
https://bottest.wiki.kernel.org/coccicheck
> +virtual context
Further variables will be needed if you would like to use corresponding
operation modes (b
> The changes were obtained by applying the following Coccinelle script.
A bit of clarification happened for its implementation details.
https://systeme.lip6.fr/pipermail/cocci/2018-October/005374.html
I have taken also another look at the following SmPL code.
> identifier fn =~
> "^(__pte_allo
>>> The changes were obtained by applying the following Coccinelle script.
How do you think about to adjust the order of provided information
in the commit description?
1. Update goals
2. Transformation implementation at the end
>> "^(?:pte_alloc(?:_one(?:_kernel)?)?|__pte_alloc(?:_kernel)?)$";
> … There is concern that …
Does this wording need a small adjustment?
> The changes were obtained by applying the following Coccinelle script.
I would find it nicer if previous patch review comments will trigger
further useful effects here.
https://patchwork.kernel.org/patch/10637703/#22265203
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
---
arch/powerpc/mm/dump_hashpag
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
---
arch/powerpc/kvm/book3s_64_mmu_hv.c | 1 -
1 file changed, 1 deletion(-
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 determination in two functions
arch/powerp
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
---
arch/powerpc/oprofile/cell/spu_task_sync.c | 8
arch/powerpc/o
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 convention.
This issue was detect
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
---
arch/powerpc/perf/hv-24x7.c | 1 -
1 file changed, 1 deletion(-)
diff
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 determination in three functions
arch/powe
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
---
arch/powerpc/platforms/cell/axon_msi.c | 5 +
arch/powerpc/platfo
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 convention.
This issue was detect
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 determination in five functions
arch/po
From: Markus Elfring
Date: Thu, 5 Oct 2017 22:30:29 +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
---
arch/powerpc/platforms/powermac/low_i2c.c | 5 +
1 file changed, 1
From: Markus Elfring
Date: Thu, 5 Oct 2017 22:40:39 +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 convention.
This issue was detect
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()
Delete an error message for a fai
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
---
drivers/char/tpm/tpm1_eventlog.c | 5 +
1 file changed, 1 insertio
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
---
drivers/char/tpm/tpm_ibmvtpm.c | 4 +---
1 file changed, 1 insertion(+
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 convention.
This issue was detec
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.
* Return directly after a call of
> 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
>> 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 noticeabl
> 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 typo in a comment line of two file
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
---
arch/powerpc/platforms/powernv/opal-async.c| 2 --
arch/power
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 convention.
Signed-off-by: Markus Elfr
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 +-
arch/powerpc/platforms/powernv/opal-memory-errors.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-
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 in pnv_ioda_pick_m64_pe()
Impr
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
---
arch/powerpc/platforms/powernv/pci-ioda.c | 5 +
1 file changed, 1
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 +-
1 file changed, 5 insertions(+), 5 deletions(-)
dif
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 convention.
This issue was det
>>> 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?
>
> A style change is one that doesn't change the effect of the execution.
This can occasionally be fine, can't it?
>
>> p = kmalloc(sizeof(*p), ...);
>>
>> The alternative form where struct name is spelled out hurts readability and
>> introduces an opportunity for a bug when the pointer variable type is changed
>> but the corresponding sizeof that is passed to a memory allocator is not.
>
> True, thanks for
From: Markus Elfring
Date: Tue, 17 Oct 2017 20:22:44 +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 update_flash_db()
Improve a size determination in two functions
arch/pow
From: Markus Elfring
Date: Tue, 17 Oct 2017 20:00:31 +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
---
arch/powerpc/platforms/ps3/os-area.c | 4 +---
1 file changed, 1 inser
From: Markus Elfring
Date: Tue, 17 Oct 2017 20:15: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 convention.
This issue was detec
>> Do you find my wording “This issue was detected by using the
>> Coccinelle software.” insufficient?
>
> The question is not whether it is insufficient, but whether it is appropriate.
I am curious on how our corresponding discussion will evolve further.
> Detecting Coccinelle issues is one st
>> I imagine that a corresponding source code analysis variant could be applied
>> in more cases if sufficient acceptance could be achieved.
>
> So, then instead of still keeping people busy with this noise you better
> start doing something like CI integration with that for *new* code?
There are
> The printk removals do change the objects.
>
> The value of that type of change is only for resource limited systems.
I imagine that such small code adjustments are also useful for other systems.
> Markus' changelogs leave much to be desired.
Would you like to help more to improve the provid
>> I imagine that such small code adjustments are also useful for other systems.
>
> Your imagination and mine differ.
This can generally be.
> Where do you _think_ it matters?
It seems that this discussion branch referred still to my cover letter
for possible changes in the TPM software area.
> Ugly grep follows:
>
> $ grep -rohP --include=*.[ch] "\w+\s*=\s*[kv].alloc\s*\(\s*sizeof.*," * | \
> sed -r -e 's/(\w+)\s*=\s*[kv].alloc\s*\(\s*sizeof\s*\(\s*\*\s*\1\s*\)/foo =
> k.alloc(sizeof(*foo))/' \
> -e
> 's/(\w+)\s*=\s*[kv].alloc\s*\(\s*sizeof\s*\(\s*struct\s+\w+\s*\)/foo =
Unpleasant consequences are possible in both cases.
>> How much do you care to reduce the failure probability further?
>
> Zero.
I am interested to improve the software situation a bit more here.
Regards,
Markus
>> If you want 'security' for kmalloc() then:
>>
>> #define KMALLOC_TYPE(flags) (type *)kmalloc(sizeof (type), flags)
>> #define KMALLOC(ptr, flags) *(ptr) = KMALLOC_TYPE(typeof *(ptr), flags)
Such an approach might help.
>> and change:
>> ptr = kmalloc(sizeof *ptr, flags);
>> to:
>> K
>> Do you find my wording “This issue was detected by using the
>> Coccinelle software.” insufficient?
>
> This is fine for cover letter, not for the commits.
I guess that there are more opinions available by other contributors
for this aspect.
> After your analysis software finds an issue you
>>> A minor complaint: all commits are missing "Fixes:" tag.
>>
>> * Do you require it to be added to the commit messages?
>
> I don't require it. It's part of the development process:
>
> https://www.kernel.org/doc/html/v4.12/process/submitting-patches.html
Yes. - But other contributors pointed
> Commit message should just describe in plain text what you are doing
Did other contributors find the wording “Replace …”
> and why.
and “… a bit safer according to the Linux coding style convention.”
sufficient often enough already?
Which description would you find more appropriate for this
> For 1/4 and 2/4: explain why the message can be omitted.
Why did you not reply directly with this request for the update steps
with the subject “Delete an error message for a failed memory allocation
in tpm_…()”?
https://patchwork.kernel.org/patch/10009405/
https://patchwork.kernel.org/patch/10
> One more word of advice: send the three as separate patches.
I do not see a need for an immediate resend at the moment.
> My guess is that it takes a factor longer time to apply 4/4
> than other patches because there's more limited crowd who can test it.
This is fine for me if somebody would
>> Why did you not reply directly with this request for the update steps
>> with the subject “Delete an error message for a failed memory allocation
>> in tpm_…()”?
>>
>> https://patchwork.kernel.org/patch/10009405/
>> https://patchwork.kernel.org/patch/10009415/
>>
>> I find that there can be diff
From: Markus Elfring
Date: Wed, 18 Oct 2017 21:11:23 +0200
A few update suggestions were taken into account
from static source code analysis.
Markus Elfring (5):
Delete five error messages for a failed memory allocation
Improve nine size determinations
Delete an unnecessary variable initia
From: Markus Elfring
Date: Wed, 18 Oct 2017 16:39:01 +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
---
arch/powerpc/platforms/pseries/dtl.c | 5 +
arch/powerpc/pl
From: Markus Elfring
Date: Wed, 18 Oct 2017 18:18:11 +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 convention.
This issue was detec
From: Markus Elfring
Date: Wed, 18 Oct 2017 19:14:39 +0200
The variable "table_group" will be set to an appropriate pointer.
Thus omit the explicit initialisation at the beginning.
Signed-off-by: Markus Elfring
---
arch/powerpc/platforms/pseries/iommu.c | 2 +-
1 file changed, 1 insertion(+),
From: Markus Elfring
Date: Wed, 18 Oct 2017 20:15:32 +0200
Return directly after a call of the function "kzalloc_node" failed
at the beginning.
Signed-off-by: Markus Elfring
---
arch/powerpc/platforms/pseries/iommu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powe
From: Markus Elfring
Date: Wed, 18 Oct 2017 20:48:52 +0200
The kfree() function was called in up to two cases by the
iommu_pseries_alloc_group() function during error handling
even if the passed variable contained a null pointer.
* Adjust jump targets according to the Linux coding style conventi
>> static struct iommu_table_group *iommu_pseries_alloc_group(int node)
>> {
>> -struct iommu_table_group *table_group = NULL;
>> +struct iommu_table_group *table_group;
>> struct iommu_table *tbl = NULL;
>> struct iommu_table_group_link *tgl = NULL;
>>
>
> I think initializi
>> @@ -61,7 +61,7 @@ static struct iommu_table_group
>> *iommu_pseries_alloc_group(int node)
>> table_group = kzalloc_node(sizeof(*table_group), GFP_KERNEL,
>> node); if (!table_group)
>> -goto fail_exit;
>> +return NULL;
>>
>> tbl = kzalloc_node(sizeof(*tbl),
>> @@ -683,13 +683,10 @@ static int tpm_ibmvtpm_probe(struct vio_dev *vio_dev,
>> reg_crq_cleanup:
>> dma_unmap_single(dev, ibmvtpm->crq_dma_handle,
>> CRQ_RES_BUF_SIZE, DMA_BIDIRECTIONAL);
>> -cleanup:
>> -if (ibmvtpm) {
>> -if (crq_q->crq_addr)
>> -free_pa
>>> The "Fixes" tag is an indication that the patch should be backported.
>>
>> No it's not that strong. It's an indication that the patch fixes another
>> commit, which may or may not mean it should be backported depending on
>> the preferences of the backporter. If it *does* need backporting then
>> If the code doing the allocation is changed in the future the single
>> cleanup can stay whereas multiple labels have to be rewritten again.
>
> No, they don't unless you choose bad label names. Perhaps numbered
> labels? We don't get a lot of those in the kernel any more. Label
> name shoul
From: Markus Elfring
Date: Wed, 6 Dec 2017 22:06:44 +0100
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 ucc_uart_probe()
Improve a size determination in ucc_uart_probe()
Fix a
From: Markus Elfring
Date: Wed, 6 Dec 2017 21:41:14 +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/tty/serial/ucc_uart.c | 4 +---
1 file changed, 1 insertion(+),
From: Markus Elfring
Date: Wed, 6 Dec 2017 21:45:32 +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 issue was dete
From: Markus Elfring
Date: Wed, 6 Dec 2017 21:56:28 +0100
Add a missing character in a function name of this description.
Signed-off-by: Markus Elfring
---
drivers/tty/serial/ucc_uart.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/tty/serial/ucc_uart.c b/drivers/
From: Markus Elfring
Date: Wed, 13 Dec 2017 18:28:38 +0100
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 three functions
Improve a size determination in two functions
Use comm
From: Markus Elfring
Date: Wed, 13 Dec 2017 17:45:23 +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
---
drivers/soc/fsl/qe/gpio.c | 4 +---
drivers/soc/fsl/qe/ucc_fast.
From: Markus Elfring
Date: Wed, 13 Dec 2017 17:51:21 +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 issue was detec
From: Markus Elfring
Date: Wed, 13 Dec 2017 18:18:56 +0100
Add jump targets so that a bit of exception handling can be better reused
at the end of this function.
Signed-off-by: Markus Elfring
---
drivers/soc/fsl/qe/ucc_fast.c | 32
1 file changed, 16 insertions
From: Markus Elfring
Date: Sat, 16 Dec 2017 14:21:04 +0100
Replace the specification of data structures 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 convention.
Signed-off-by: Markus
From: Markus Elfring
Date: Sat, 16 Dec 2017 14:42:24 +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 in two functions
Improve a size determination in five functions
drivers/ps3
From: Markus Elfring
Date: Sat, 16 Dec 2017 12:32:42 +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
---
drivers/ps3/ps3-lpm.c | 2 --
drivers/ps3/ps3-vuart.c | 1 -
2 fil
>> Replace the specification of data structures 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 convention.
>
> This would be OK,
Thanks.
> but you are also removing empty lines
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 failed kmalloc() in dev_nvram_writ
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
---
arch/powerpc/kernel/nvram_64.c | 12
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 insertion(+), 3 deletions(-)
diff --git a/arch/powerpc/kernel/nvram_64.c
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
---
arch/powerpc
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 soft
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/powerpc/kernel/n
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/ker
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/powerpc/kernel/nvram_64
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
with this refactoring.
Signe
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 soft
> 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 error code a
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 u
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.
Signed-off-by: Mar
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
1 - 100 of 163 matches
Mail list logo