[PATCH 4/8] powerpc/nvram: Return directly after a failed parameter validation in dev_nvram_read()

2017-01-19 Thread SF Markus Elfring
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

[PATCH 3/8] powerpc/nvram: Move an assignment for the variable "ret" in dev_nvram_write()

2017-01-19 Thread SF 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

[PATCH 7/8] powerpc/nvram: Improve size determinations in three functions

2017-01-19 Thread SF Markus Elfring
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

[PATCH 8/8] powerpc/nvram: Move an assignment for the variable "err" in nvram_scan_partitions()

2017-01-19 Thread SF 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: Markus Elfring --- arch/powerpc

[PATCH 5/8] powerpc/nvram: Return directly after a failed kmalloc() in dev_nvram_read()

2017-01-19 Thread SF Markus Elfring
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

[PATCH 1/8] powerpc/nvram: Return directly after a failed parameter validation in dev_nvram_write()

2017-01-19 Thread SF Markus Elfring
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

[PATCH] powerpc/rtas_flash: Move an assignment for the variable "rc" in manage_flash_write()

2017-01-19 Thread SF Markus Elfring
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

Re: powerpc/nvram: Move an assignment for the variable "ret" in dev_nvram_write()

2017-01-19 Thread SF Markus Elfring
> 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

[PATCH 00/11] PowerPC-KVM: Fine-tuning for some function implementations

2017-01-20 Thread SF Markus Elfring
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

[PATCH 01/11] KVM: PPC: Book3S HV: Move assignments for the variable "err" in kvm_htab_write()

2017-01-20 Thread SF Markus Elfring
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

[PATCH 02/11] KVM: PPC: Book3S HV: Improve a size determination in kvmppc_alloc_hpt()

2017-01-20 Thread SF Markus Elfring
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

[PATCH 03/11] KVM: PPC: Book3S HV: Move error code assignments in two functions

2017-01-20 Thread SF Markus Elfring
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

[PATCH 04/11] KVM: PPC: Book3S HV: Use common error handling code in kvmppc_clr_passthru_irq()

2017-01-20 Thread SF Markus Elfring
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

[PATCH 05/11] KVM: PPC: Book3S HV: Adjust nine checks for null pointers

2017-01-20 Thread SF Markus Elfring
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

[PATCH 06/11] KVM: PPC: Book3S HV: Use kcalloc() in kvmppc_alloc_host_rm_ops()

2017-01-20 Thread SF Markus Elfring
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

[PATCH 07/11] KVM: PPC: Book3S HV: Improve size determinations in five functions

2017-01-20 Thread SF Markus Elfring
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

[PATCH 08/11] KVM: PPC: Book3S: Use seq_puts() in xics_debug_show()

2017-01-20 Thread SF Markus Elfring
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

[PATCH 09/11] KVM: PPC: Book3S: Improve a size determination in two functions

2017-01-20 Thread SF 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

[PATCH 10/11] KVM: PPC: e500: Use kcalloc() in e500_mmu_host_init()

2017-01-20 Thread SF Markus Elfring
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

[PATCH 11/11] KVM: PPC: Return directly after a failed copy_from_user() in two functions

2017-01-20 Thread SF Markus Elfring
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

[PATCH] powerpc/sstep: Return directly after a failed address_ok() in emulate_step()

2017-01-21 Thread SF Markus Elfring
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

[PATCH] powerpc/mm: Return directly after a failed __copy_from_user() in sys_subpage_prot()

2017-01-21 Thread SF 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 this refa

Re: ps3: Improve a size determination in five functions

2017-12-20 Thread SF Markus Elfring
> 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

[PATCH] pci/hotplug: Delete error messages for a failed memory allocation in four functions

2017-12-29 Thread SF Markus Elfring
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

[PATCH] wan/fsl_ucc_hdlc: Delete an error message for a failed memory allocation in ucc_hdlc_probe()

2017-12-30 Thread SF Markus Elfring
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

[PATCH] ps3_gelic_net: Delete an error message for a failed memory allocation in gelic_descr_prepare_rx()

2018-01-03 Thread SF Markus Elfring
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

[PATCH] KVM: PPC: Use seq_puts() in kvmppc_exit_timing_show()

2018-01-07 Thread SF Markus Elfring
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 -

[PATCH 0/5] powerpc/platforms/4xx: Adjustments for six function implementations

2018-01-11 Thread SF 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

[PATCH 1/5] powerpc/4xx: Combine four seq_printf() calls into two in ocm_debugfs_show()

2018-01-11 Thread SF Markus Elfring
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

[PATCH 2/5] powerpc/4xx: Use seq_putc() in ocm_debugfs_show()

2018-01-11 Thread SF Markus Elfring
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

[PATCH 3/5] powerpc/4xx: Delete an error message for a failed memory allocation in three functions

2018-01-11 Thread SF Markus Elfring
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

[PATCH 5/5] powerpc/4xx: Delete an unnecessary return statement in two functions

2018-01-11 Thread SF Markus Elfring
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

[PATCH 4/5] powerpc/4xx: Improve a size determination in two functions

2018-01-11 Thread SF 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

[PATCH 0/2] macintosh/rack-meter: Adjustments for rackmeter_probe()

2018-01-16 Thread SF Markus Elfring
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

[PATCH 1/2] macintosh/rack-meter: Delete an error message for a failed memory allocation in rackmeter_probe()

2018-01-16 Thread SF Markus Elfring
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

[PATCH 2/2] macintosh/rack-meter: Improve a size determination in rackmeter_probe()

2018-01-16 Thread SF Markus Elfring
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

[PATCH] crypto: nx-842: Delete an error message for a failed memory allocation in nx842_pseries_init()

2018-02-15 Thread SF Markus Elfring
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

[PATCH] powerpc: Use common error handling code in setup_new_fdt()

2018-03-11 Thread SF Markus Elfring
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

[PATCH] cxl: Delete an unnecessary check before the function call "of_node_put"

2016-07-20 Thread SF 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. Signed-off-by: Markus Elfring

[PATCH] drivers/macintosh: Delete owner assignment

2016-08-14 Thread SF 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

[PATCH] powerpc/512x: Delete unnecessary assignment for the field "owner"

2016-08-15 Thread SF Markus Elfring
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.

[PATCH] powerpc: mpc8349emitx: Delete unnecessary assignment for the field "owner"

2016-08-15 Thread SF Markus Elfring
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.

[PATCH] powerpc/powernv/pci: Use kmalloc_array() in two functions

2016-08-24 Thread SF Markus Elfring
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

[PATCH 0/6] KVM: PPC: e500: Fine-tuning for two function implementations

2016-08-28 Thread SF Markus Elfring
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

[PATCH 2/6] KVM: PPC: e500: Less function calls in kvm_vcpu_ioctl_config_tlb() after error detection

2016-08-28 Thread SF Markus Elfring
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

[PATCH 4/6] KVM: PPC: e500: Replace kzalloc() calls by kcalloc() in two functions

2016-08-28 Thread SF Markus Elfring
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

[PATCH 5/6] KVM: PPC: e500: Use kmalloc_array() in kvmppc_e500_tlb_init()

2016-08-28 Thread SF Markus Elfring
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

[PATCH 1/6] KVM: PPC: e500: Use kmalloc_array() in kvm_vcpu_ioctl_config_tlb()

2016-08-28 Thread SF Markus Elfring
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

[PATCH 6/6] KVM: PPC: e500: Rename jump labels in kvmppc_e500_tlb_init()

2016-08-28 Thread SF Markus Elfring
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

[PATCH 3/6] KVM: PPC: e500: Delete an unnecessary initialisation in kvm_vcpu_ioctl_config_tlb()

2016-08-28 Thread SF Markus Elfring
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

[PATCH] powerpc: Use kmalloc_array() in grow()

2016-08-28 Thread SF 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 detected by using the

[PATCH 0/5] PowerPC: Fine-tuning for three function implementations

2016-08-29 Thread SF Markus Elfring
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

[PATCH 0/5] PowerPC: Fine-tuning for three function implementations

2016-08-29 Thread SF Markus Elfring
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

[PATCH 1/5] powerpc-mpic: Use kmalloc_array() in mpic_init()

2016-08-29 Thread SF Markus Elfring
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

[PATCH 2/5] powerpc-MSI: Use kmalloc_array() in ppc4xx_setup_msi_irqs()

2016-08-29 Thread SF Markus Elfring
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

[PATCH 3/5] powerpc-MSI-HSTA: Use kmalloc_array() in hsta_msi_probe()

2016-08-29 Thread SF Markus Elfring
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

[PATCH 4/5] powerpc-MSI-HSTA: Rename jump labels in hsta_msi_probe()

2016-08-29 Thread SF 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 file changed, 6 insertions(+), 9 deletions(-) diff --git a

[PATCH 5/5] powerpc-MSI-HSTA: Move three assignments in hsta_msi_probe()

2016-08-29 Thread SF Markus Elfring
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

[PATCH] KVM: PPC: e500: Rename jump labels in kvmppc_e500_tlb_init()

2016-09-12 Thread SF 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 branch "kvm-ppc-next" of another source code repository

[PATCH 0/4] axonram: Adjustments for axon_ram_probe()

2017-08-03 Thread SF Markus Elfring
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

[PATCH 1/4] axonram: Delete an error message for a failed memory allocation in axon_ram_probe()

2017-08-03 Thread SF Markus Elfring
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

[PATCH 3/4] axonram: Return directly after a failed kzalloc() in axon_ram_probe()

2017-08-03 Thread SF Markus Elfring
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

[PATCH 4/4] axonram: Delete an unnecessary variable initialisation in axon_ram_probe()

2017-08-03 Thread SF Markus Elfring
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

[PATCH 2/4] axonram: Improve a size determination in axon_ram_probe()

2017-08-03 Thread SF Markus Elfring
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

[PATCH] powerpc/eeh: Delete an error message for a failed memory allocation in two functions

2017-08-04 Thread SF Markus Elfring
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

[PATCH] block/ps3vram: Delete an error message for a failed memory allocation in ps3vram_cache_init()

2017-08-07 Thread SF Markus Elfring
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

Re: block/ps3vram: Delete an error message for a failed memory allocation in ps3vram_cache_init()

2017-08-07 Thread SF Markus Elfring
>> 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

Re: block/ps3vram: Delete an error message for a failed memory allocation in ps3vram_cache_init()

2017-08-07 Thread SF Markus Elfring
>> 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

Re: block/ps3vram: Delete an error message for a failed memory allocation in ps3vram_cache_init()

2017-08-07 Thread SF Markus Elfring
>>> 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

Re: block/ps3vram: Delete an error message for a failed memory allocation in ps3vram_cache_init()

2017-08-08 Thread SF Markus Elfring
>> 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

Re: block/ps3vram: Check return of ps3vram_cache_init

2017-08-08 Thread SF Markus Elfring
> @@ -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; > + } > + >

[PATCH] ASoC: Freescale: Delete an error message for a failed memory allocation in three functions

2017-08-11 Thread SF 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 a memory allocation failure

[PATCH] leds-PowerNV: Delete an error message for a failed memory allocation in powernv_led_create()

2017-08-27 Thread SF Markus Elfring
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

Re: axonram: Delete an error message for a failed memory allocation in axon_ram_probe()

2017-09-01 Thread SF 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. > https://git.kernel.org/powerpc/c/a1bddf3991573f3dff2762bfca5

Re: powerpc/eeh: Delete an error message for a failed memory allocation in two functions

2017-09-05 Thread SF Markus Elfring
> 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

[PATCH v2] axonram: Delete an unnecessary variable initialisation in axon_ram_probe()

2017-09-05 Thread SF Markus Elfring
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

<    1   2   3