Re: hyperv/netvsc: Delete two error messages for a failed memory allocation in netvsc_init_buf()

2018-01-15 Thread SF Markus Elfring
> These messages are not displayed anywhere else: > "unable to allocate receive buffer of size %u\n" > "unable to allocate send buffer of size %u\n", > > After set ret = -ENOMEM; and cleanup, we won't know which buffer allocation > failed without the error message. How do you think about to achi

Re: hyperv/netvsc: Delete two error messages for a failed memory allocation in netvsc_init_buf()

2018-01-08 Thread SF Markus Elfring
> These messages are not displayed anywhere else: > "unable to allocate receive buffer of size %u\n" > "unable to allocate send buffer of size %u\n", > > After set ret = -ENOMEM; and cleanup, we won't know which buffer allocation > failed without the error message. Do you notice a Linux allocati

[PATCH] hyperv/netvsc: Delete two error messages for a failed memory allocation in netvsc_init_buf()

2018-01-07 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 7 Jan 2018 21:03:26 +0100 Omit extra messages for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/net/hyperv/netvsc.c | 5 - 1 file changed, 5 deletions(-) di

[PATCH] staging/rtl8192u/ieee80211: Delete an error message for a failed memory allocation in ieee80211_networks_allocate()

2017-12-13 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 13 Dec 2017 15:46:07 +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/staging/rtl8192u/ieee80211/ieee80211_module.c | 5 + 1 fil

[PATCH] staging: vt6656: Delete an error message for a failed memory allocation in vnt_alloc_bufs()

2017-12-13 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 13 Dec 2017 15:15:45 +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/staging/vt6656/main_usb.c | 5 + 1 file changed, 1 inserti

[PATCH 4/4] staging/wlan-ng/prism2fw: Use common error handling code in writeimage()

2017-12-13 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 13 Dec 2017 13:41:41 +0100 Replace two calls of the function "kfree" by a jump to the same statements at the end of this function so that the generated object code could become a bit smaller. Signed-off-by: Markus Elfring --- drivers/staging/wlan-ng/prism2fw.c |

[PATCH 3/4] staging/wlan-ng/prism2fw: Delete an error message for a failed memory allocation in writeimage()

2017-12-13 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 13 Dec 2017 13:28:15 +0100 Omit an extra message for a memory allocation failure in this function. Signed-off-by: Markus Elfring --- drivers/staging/wlan-ng/prism2fw.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging/wlan-ng/prism2fw.c b/dr

[PATCH 2/4] staging/wlan-ng/prism2fw: Use a known error code after a failed kzalloc() in mkimage()

2017-12-13 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 13 Dec 2017 13:20:10 +0100 Make a memory allocation failure clearer by using the error code "-ENOMEM" (instead of the constant "1") in this function. Signed-off-by: Markus Elfring --- drivers/staging/wlan-ng/prism2fw.c | 2 +- 1 file changed, 1 insertion(+), 1 d

[PATCH 1/4] staging/wlan-ng/prism2fw: Delete an error message for a failed memory allocation in mkimage()

2017-12-13 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 13 Dec 2017 12:57: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/staging/wlan-ng/prism2fw.c | 5 ++--- 1 file changed, 2 insert

[PATCH 0/4] staging/wlan-ng/prism2fw: Adjustments for two function implementations

2017-12-13 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 13 Dec 2017 14:03:02 +0100 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 mkimage() Use a known error code after a failed kzalloc() in mkimage()

[PATCH] staging: unisys: visorchipset: Use common error handling code in setup_crash_devices_work_queue()

2017-11-03 Thread SF Markus Elfring
From: Markus Elfring Date: Fri, 3 Nov 2017 20:37:03 +0100 * Add a jump target so that a specific error message is stored only once at the end of this function implementation. * Replace four calls of the function "dev_err" by goto statements. This issue was detected by using the Coccinelle sof

[PATCH] staging/rts5208/rtsx: Improve unlocking of a mutex in rtsx_resume()

2017-11-03 Thread SF Markus Elfring
From: Markus Elfring Date: Fri, 3 Nov 2017 20:02:22 +0100 * Add a jump target so that a call of the function "mutex_unlock" is stored only twice in this function implementation. * Replace two calls by goto statements. This issue was detected by using the Coccinelle software. Signed-off-by: M

Re: staging: comedi: usbduxfast: Improve unlocking of a mutex in usbduxfast_ai_insn_read()

2017-11-03 Thread SF Markus Elfring
> FYI, you are responding to someone who is on my blacklist I am curious if this communication setting will ever be adjusted. > and I never accept patches from. The history shows that our collaboration style changed over time. I got a few update suggestions integrated (also by you) because othe

Re: [PATCH] staging: comedi: usbduxfast: Improve unlocking of a mutex in usbduxfast_ai_insn_read()

2017-11-03 Thread SF Markus Elfring
>> @@ -838,6 +834,10 @@ static int usbduxfast_ai_insn_read(struct comedi_device >> *dev, >>   mutex_unlock(&devpriv->mut); >>     return insn->n; > > Minor niggle: You could also remove that call to mutex_unlock() by replacing > the above three lines with: > > ret = insn->n; > > wh

[PATCH] staging/media/davinci_vpfe: Use common error handling code in vpfe_attach_irq()

2017-11-03 Thread SF Markus Elfring
From: Markus Elfring Date: Fri, 3 Nov 2017 10:45:31 +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 --- drivers/staging/media/davinci_vpfe/vpfe

[PATCH] staging: iio: ad7746: Improve unlocking of a mutex in ad7746_start_calib()

2017-11-03 Thread SF Markus Elfring
From: Markus Elfring Date: Fri, 3 Nov 2017 09:26:28 +0100 * Add a jump target so that a call of the function "mutex_unlock" is stored only twice in this function implementation. * Replace two calls by goto statements. This issue was detected by using the Coccinelle software. Signed-off-by: M

[PATCH] staging: iio: ad7152: Improve unlocking of a mutex in ad7152_start_calib()

2017-11-03 Thread SF Markus Elfring
From: Markus Elfring Date: Fri, 3 Nov 2017 09:00:25 +0100 * Add a jump target so that a call of the function "mutex_unlock" is stored only twice in this function implementation. * Replace two calls by goto statements. This issue was detected by using the Coccinelle software. Signed-off-by: M

[PATCH] staging: fbtft: fb_ssd1331: Use common error handling code in write_reg8_bus8()

2017-11-02 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 2 Nov 2017 22:27:13 +0100 * Add a jump target so that a specific error message is stored only once at the end of this function implementation. * Replace two calls of the function "dev_err" by goto statements. This issue was detected by using the Coccinelle soft

[PATCH] staging: fbtft: fb_ra8875: Use common error handling code in write_reg8_bus8()

2017-11-02 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 2 Nov 2017 22:12:58 +0100 * Add a jump target so that a specific error message is stored only once at the end of this function implementation. * Replace two calls of the function "dev_err" by goto statements. This issue was detected by using the Coccinelle soft

[PATCH] staging: comedi: usbduxsigma: Improve unlocking of a mutex in three functions

2017-11-02 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 2 Nov 2017 21:16:50 +0100 * Add a jump target so that a call of the function "mutex_unlock" is stored only twice in these function implementations. * Replace seven calls by goto statements. This issue was detected by using the Coccinelle software. Signed-off-b

[PATCH] staging: comedi: usbduxfast: Improve unlocking of a mutex in usbduxfast_ai_insn_read()

2017-11-02 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 2 Nov 2017 20:30:31 +0100 * Add a jump target so that a call of the function "mutex_unlock" is stored only twice in this function implementation. * Replace five calls by goto statements. This issue was detected by using the Coccinelle software. Signed-off-by:

Re: staging/irda/net: Adjustments for several function implementations

2017-10-12 Thread SF Markus Elfring
> Did you read drivers/staging/irda/TODO ? Yes. How do recent contributions (by other software developers) fit to information that is provided in this file? Regards, Markus ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdrive

[PATCH 10/10] staging/irda/net: Use seq_puts() in four functions

2017-10-12 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 12 Oct 2017 11:08:36 +0200 Strings which did not contain a data format specification 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 --- drive

[PATCH 09/10] staging/irda/net: Combine some seq_printf() calls in two functions

2017-10-12 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 12 Oct 2017 08:58:38 +0200 Some data were printed into a sequence by separate function calls. Print the same data by a single function call at each place instead. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- driver

[PATCH 08/10] staging/irda/net: Use common error handling code in irias_new_object()

2017-10-12 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 12 Oct 2017 08:52:53 +0200 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 --- drivers/staging/irda/net/irias_object.c | 14 -- 1 file changed, 8 insertions(+), 6 d

[PATCH 07/10] staging/irda/net: Delete an unnecessary variable initialisation in four functions

2017-10-12 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 11 Oct 2017 22:26:00 +0200 The variable "tx_skb" will eventually be set to an appropriate pointer a bit later. Thus omit the explicit initialisation at the beginning. Signed-off-by: Markus Elfring --- drivers/staging/irda/net/irlap_frame.c | 6 +++--- drivers/st

[PATCH 06/10] staging/irda/net: Delete an unnecessary variable initialisation in two functions

2017-10-12 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 11 Oct 2017 22:22:13 +0200 The local variable "tx_skb" will only be used in a single if branch of these functions. Thus omit the explicit initialisation at the beginning. Signed-off-by: Markus Elfring --- drivers/staging/irda/net/irlap_frame.c | 4 ++-- 1 file c

[PATCH 05/10] staging/irda/net: Delete an unnecessary variable initialisation in irlap_recv_discovery_xid_rsp()

2017-10-12 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 11 Oct 2017 22:20:22 +0200 The variable "discovery" will eventually be set to an appropriate pointer a bit later. Thus omit the explicit initialisation at the beginning. Signed-off-by: Markus Elfring --- drivers/staging/irda/net/irlap_frame.c | 2 +- 1 file chan

[PATCH 04/10] staging/irda/net: Delete an unnecessary variable initialisation in irlap_recv_discovery_xid_cmd()

2017-10-12 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 11 Oct 2017 22:18:34 +0200 The local variable "discovery" will only be used in a single if branch of this function. Thus omit the explicit initialisation at the beginning. Signed-off-by: Markus Elfring --- drivers/staging/irda/net/irlap_frame.c | 2 +- 1 file ch

[PATCH 03/10] staging/irda/net: Adjust 385 checks for null pointers

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

[PATCH 02/10] staging: irda: Delete ten error messages for a failed memory allocation

2017-10-12 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 10 Oct 2017 21:10:43 +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 --- drivers/staging/irda/net/irias_object.c | 24

[PATCH 01/10] staging: irda: Improve a size determination in 20 functions

2017-10-12 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 10 Oct 2017 19:35:56 +0200 * Replace the specification of data types 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 de

[PATCH 00/10] staging/irda/net: Adjustments for several function implementations

2017-10-12 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 12 Oct 2017 11:25:43 +0200 Several update suggestions were taken into account from static source code analysis. Markus Elfring (10): Improve a size determination in 20 functions Delete ten error messages for a failed memory allocation Adjust 385 checks for n

Re: [PATCH 13/14] vme: tsi148: Improve 17 size determinations

2017-08-30 Thread SF Markus Elfring
@@ -2363,5 +2364,5 @@ static int tsi148_probe(struct pci_dev *pdev, const struct pci_device_id *id) master_num--; tsi148_device->flush_image = -kmalloc(sizeof(struct vme_master_resource), GFP_KERNEL); +

[PATCH] staging: netlogic: Delete an error message for a failed memory allocation in xlr_config_spill()

2017-08-26 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 26 Aug 2017 18:44:12 +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/staging/netlogic/xlr_net.c | 4 +--- 1 file changed, 1 inserti

[PATCH] staging: fsl-mc: Delete an error message for a failed memory allocation in fsl_mc_resource_pool_add_device()

2017-08-26 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 26 Aug 2017 18:23:52 +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/staging/fsl-mc/bus/fsl-mc-allocator.c | 2 -- 1 file changed,

Re: [PATCH 13/14] vme: tsi148: Improve 17 size determinations

2017-08-26 Thread SF Markus Elfring
>> @@ -2363,5 +2364,5 @@ static int tsi148_probe(struct pci_dev *pdev, const >> struct pci_device_id *id) >> master_num--; >> >> tsi148_device->flush_image = >> -kmalloc(sizeof(struct vme_master_resource), GFP_KERNEL); >> +kmalloc

[PATCH 14/14] vme: tsi148: Adjust 14 checks for null pointers

2017-08-25 Thread SF Markus Elfring
From: Markus Elfring Date: Fri, 25 Aug 2017 12:00:17 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The script “checkpatch.pl” pointed information out like the following. Comparison to NULL could be written … Thus fix the affected source code pla

[PATCH 13/14] vme: tsi148: Improve 17 size determinations

2017-08-25 Thread SF Markus Elfring
From: Markus Elfring Date: Fri, 25 Aug 2017 11:55:03 +0200 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

[PATCH 12/14] vme: tsi148: Delete nine error messages for a failed memory allocation

2017-08-25 Thread SF Markus Elfring
From: Markus Elfring Date: Fri, 25 Aug 2017 11:10:07 +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 --- drivers/vme/bridges/vme_tsi148.c | 18 -- 1 file chang

[PATCH 11/14] vme: ca91cx42: Adjust 14 checks for null pointers

2017-08-25 Thread SF Markus Elfring
From: Markus Elfring Date: Fri, 25 Aug 2017 11:01:29 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The script “checkpatch.pl” pointed information out like the following. Comparison to NULL could be written … Thus fix the affected source code pla

[PATCH 10/14] vme: ca91cx42: Improve 12 size determinations

2017-08-25 Thread SF Markus Elfring
From: Markus Elfring Date: Fri, 25 Aug 2017 10:56:41 +0200 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

[PATCH 09/14] vme: ca91cx42: Delete eight error messages for a failed memory allocation

2017-08-25 Thread SF Markus Elfring
From: Markus Elfring Date: Fri, 25 Aug 2017 10:20:03 +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 --- drivers/vme/bridges/vme_ca91cx42.c | 16 1 file chang

[PATCH 08/14] vme: fake: Adjust 11 checks for null pointers

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

[PATCH 07/14] vme: fake: Improve five size determinations in fake_init()

2017-08-25 Thread SF Markus Elfring
From: Markus Elfring Date: Fri, 25 Aug 2017 09:46:13 +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

[PATCH 06/14] vme: fake: Delete an error message for a failed memory allocation in fake_init()

2017-08-25 Thread SF Markus Elfring
From: Markus Elfring Date: Fri, 25 Aug 2017 09:31:46 +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/vme/bridges/vme_fake.c | 1 - 1 file changed, 1 deletion(-) d

[PATCH 05/14] vme: Return directly in two functions

2017-08-25 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 24 Aug 2017 22:32:14 +0200 Return directly without using an intermediate local variable in these functions. Signed-off-by: Markus Elfring --- drivers/vme/vme.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/vme/vme.c b/dri

[PATCH 02/14] vme: Improve 11 size determinations

2017-08-25 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 24 Aug 2017 21:52:00 +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

[PATCH 04/14] vme: Adjust 48 checks for null pointers

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

[PATCH 03/14] vme: Move an assignment in vme_new_dma_list()

2017-08-25 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 24 Aug 2017 22:04:45 +0200 Assign a pointer to a data structure member without using an intermediate local variable. Signed-off-by: Markus Elfring --- drivers/vme/vme.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/vme/vme.c

[PATCH 01/14] vme: Delete 11 error messages for a failed memory allocation

2017-08-25 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 24 Aug 2017 21:38:20 +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 --- drivers/vme/vme.c | 51 ---

[PATCH 00/14] VME: Adjustments for several function implementations

2017-08-25 Thread SF Markus Elfring
From: Markus Elfring Date: Fri, 25 Aug 2017 13:15:43 +0200 Several update suggestions were taken into account from static source code analysis. Markus Elfring (14): Delete 11 error messages for a failed memory allocation Improve 11 size determinations Move an assignment in vme_new_dma_list

[PATCH] staging: wilc1000: Delete an error message for a failed memory allocation in Handle_Key()

2017-05-17 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 17 May 2017 22:26:07 +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 Sign

[PATCH] staging: netlogic: Delete an error message for a failed memory allocation in xlr_config_spill()

2017-05-17 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 17 May 2017 19:01:10 +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 Sign

Re: Clarification for general change acceptance

2017-05-12 Thread SF Markus Elfring
> When you make a patch, you are not obliged to eliminate all of the other > checkpatch warnings on the file. Your view is generally fine. > I don't know where you got this idea from. I got used as a professional software developer to some approaches for reducing development warnings to some de

Re: Clarification for general change acceptance

2017-05-12 Thread SF Markus Elfring
> Developer reputation matters for somewhat controversial > patches being applied as well as non-controversial and > obviously correct patches being ignored. I am aware that there are more factors involved. > Your reputation means most all of your patches fall into > the latter category. I hope

Re: vmbus: Delete an error message for a failed memory allocation in vmbus_device_create()

2017-05-12 Thread SF Markus Elfring
>> Just because an automated tool says that this needs to change does not >> mean it has to. > > Checkpatch.pl is correct here. This message is useless. It's during > init so it's unlikely to fail ever. In current kernels small kmallocs > are quaranteed to succeed so it can't actually fail curr

Re: vmbus: Delete an error message for a failed memory allocation in vmbus_device_create()

2017-05-11 Thread SF Markus Elfring
> Taking out the message assumes that all callers of this function either log an > error or pass appropriate error code back to userspace. Do you like the default error response by Linux memory allocation functions? Regards, Markus ___ devel mailing lis

[PATCH 4/4] vmbus: Adjust five checks for null pointers

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

[PATCH 3/4] vmbus: Fix a typo in a comment line

2017-05-11 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 11 May 2017 17:43:55 +0200 Add a missing character in this description. Signed-off-by: Markus Elfring --- drivers/hv/vmbus_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c index 96328aebae5

[PATCH 2/4] vmbus: Delete an error message for a failed memory allocation in vmbus_device_create()

2017-05-11 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 11 May 2017 17:33:14 +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 Sign

[PATCH 1/4] vmbus: Improve a size determination in vmbus_device_create()

2017-05-11 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 11 May 2017 17:30: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. Signed-off-by: Mar

[PATCH 0/4] VMBus: Adjustments for some function implementations

2017-05-11 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 11 May 2017 18:00:18 +0200 A few update suggestions were taken into account from static source code analysis. Markus Elfring (4): Improve a size determination in vmbus_device_create() Delete an error message for a failed memory allocation in vmbus_device_crea

[PATCH] android: binder: Use seq_putc() in print_binder_node()

2017-05-07 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 7 May 2017 22:07:16 +0200 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 --- drivers/android/binder.c | 2 +-

Re: staging: ks7010: Adjust dev_err() calls in ks7010_sdio_probe()

2017-04-12 Thread SF Markus Elfring
> This patch does not apply to Greg's staging-testing branch. Could the proposed changes be applied with a bit of “fuzz” for the implementation of the function “ks7010_sdio_probe”? > Markus a patch was merged the same day you submitted this one that > refactored this code. Do you refer to your

[PATCH] staging: ks7010: Adjust dev_err() calls in ks7010_sdio_probe()

2017-04-11 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 11 Apr 2017 14:54:35 +0200 The use of the logging function "dev_err" was introduced here on 2016-09-26. I find the following implementation details worth for another look. * Reduce expressions for the first input parameter "dev". * Omit an extra module prefix in

[PATCH 5/5] staging/lustre/obdclass: Use seq_puts() in three functions

2017-01-01 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 1 Jan 2017 16:45:32 +0100 A string which did not contain a data format specification should be put into a sequence. Thus use the corresponding function "seq_puts" so that the data output will be a bit more efficient in these functions. This issue was detected by u

[PATCH 4/5] staging/lustre/obdclass: Combine two seq_printf() calls into one call in lprocfs_rd_state()

2017-01-01 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 1 Jan 2017 16:26:36 +0100 Some data were printed into a sequence by two separate function calls. Print the same data by a single function call instead. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/staging/l

[PATCH 3/5] staging/lustre/obdclass: Use seq_putc() in four functions

2017-01-01 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 1 Jan 2017 16:12:23 +0100 A few 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 --- drivers/staging/lustre/lus

[PATCH 2/5] staging/lustre/mgc: Combine two seq_printf() calls into one call in lprocfs_mgc_rd_ir_state()

2017-01-01 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 1 Jan 2017 15:40:29 +0100 Some data were printed into a sequence by two separate function calls. Print the same data by a single function call instead. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/staging/l

[PATCH 1/5] staging/lustre/llite: Use seq_puts() in three functions

2017-01-01 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 1 Jan 2017 15:30:45 +0100 A string which did not contain a data format specification should be put into a sequence. Thus use the corresponding function "seq_puts" so that the data output will be a bit more efficient in these functions. This issue was detected by u

[PATCH 0/5] staging-Lustre: Fine-tuning for some function implementations

2017-01-01 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 1 Jan 2017 17:10:10 +0100 A few update suggestions were taken into account from static source code analysis. Markus Elfring (5): llite: Use seq_puts() in three functions mgc: Combine two seq_printf() calls into one call in lprocfs_mgc_rd_ir_state() obdclass:

[PATCH 6/6] staging: vchiq_arm: Delete an unnecessary return statement in two functions

2016-12-31 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 31 Dec 2016 22:05:19 +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 affected functions. Signed-off-by: Markus Elfring --- drivers/st

[PATCH 5/6] staging: vchiq_arm: Combine substrings for 24 messages

2016-12-31 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 31 Dec 2016 22:00:28 +0100 The script "checkpatch.pl" pointed information out like the following. WARNING: quoted string split across lines * Thus fix the affected source code places. * Improve indentation for passed parameters. Signed-off-by: Markus Elfring -

[PATCH 4/6] staging: vchiq_arm: Delete an error message for a failed memory allocation in dump_phys_mem()

2016-12-31 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 31 Dec 2016 21:30:31 +0100 Omit an extra message for a memory allocation failure in this function. Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf Signed-off-by: Markus Elfring --- drivers/staging/vc04_servic

[PATCH 3/6] staging: vchiq_arm: One check less in dump_phys_mem() after error detection

2016-12-31 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 31 Dec 2016 21:26:09 +0100 Adjust a jump target according to the Linux coding style convention so that a redundant check for a null pointer can be avoided in this function. Signed-off-by: Markus Elfring --- drivers/staging/vc04_services/interface/vchiq_arm/vchiq

[PATCH 2/6] staging: vchiq_arm: Adjust 13 checks for null pointers

2016-12-31 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 31 Dec 2016 21:23:24 +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 the affected source code pla

[PATCH 1/6] staging: vchiq_arm: Use kmalloc_array() in dump_phys_mem()

2016-12-31 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 31 Dec 2016 17:50:25 +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 "kmalloc_array". This issue was detected by using the Coccinelle s

[PATCH 0/6] staging: vchiq_arm: Fine-tuning for some function implementations

2016-12-31 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 31 Dec 2016 22:42:34 +0100 Some update suggestions were taken into account from static source code analysis. Markus Elfring (6): Use kmalloc_array() in dump_phys_mem() Adjust 13 checks for null pointers One check less in dump_phys_mem() after error detection

[PATCH] staging: r8192U_core: Use kmalloc_array() in rtl8192_usb_initendpoints()

2016-12-30 Thread SF Markus Elfring
From: Markus Elfring Date: Fri, 30 Dec 2016 21:43:22 +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 "kmalloc_array". This issue was detected by using the Coccinelle s

[PATCH 4/4] staging: greybus: power_supply: Use kcalloc() in gb_power_supplies_setup()

2016-12-09 Thread SF Markus Elfring
From: Markus Elfring Date: Fri, 9 Dec 2016 15:04:24 +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 Coccinelle software

[PATCH 3/4] staging: greybus: light: Check return value of a kstrndup() call in gb_lights_light_config()

2016-12-09 Thread SF Markus Elfring
From: Markus Elfring Date: Fri, 9 Dec 2016 14:36:16 +0100 A return value was not checked after a call of the function "kstrndup". This issue was detected by using the Coccinelle software. Add a bit of exception handling. Fixes: 2870b52bae4c81823ffcb3ed2b0626fb39d64f48 ("greybus: lights: add lig

[PATCH 2/4] staging: greybus: light: Use kcalloc() in two functions

2016-12-09 Thread SF Markus Elfring
From: Markus Elfring Date: Fri, 9 Dec 2016 13:46:25 +0100 * Multiplications for the size determination of memory allocations indicated that array data structures should be processed. Thus use the corresponding function "kcalloc". This issue was detected by using the Coccinelle software. *

[PATCH 1/4] staging: greybus: camera: One function call less in gb_camera_configure_streams() after error detection

2016-12-09 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 8 Dec 2016 18:25:13 +0100 The kfree() function was called in one case by the gb_camera_configure_streams() function during error handling even if the passed variable contained a null pointer. This issue was detected by using the Coccinelle software. Adjust a jump

[PATCH 0/4] staging-greybus: Fine-tuning for four functions

2016-12-09 Thread SF Markus Elfring
From: Markus Elfring Date: Fri, 9 Dec 2016 15:25:35 +0100 A few update suggestions were taken into account from static source code analysis. Markus Elfring (4): One function call less in gb_camera_configure_streams() after error detection light: Use kcalloc() in two functions Check return

Re: staging: comedi: usbduxsigma: Split a condition check in usbduxsigma_alloc_usb_buffers()

2016-12-08 Thread SF Markus Elfring
>> * Reduce memory allocation sizes for two function calls. Is this implementation detail worth for further considerations? Regards, Markus ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driv

Re: staging: comedi: usbdux: Split a condition check in usbdux_alloc_usb_buffers()

2016-12-08 Thread SF Markus Elfring
> Actually, the original code worked fine, I got my doubts when some memory allocations are attempted without checking the desired success immediately. > and these changes will result in an Oops if the allocations fail. I'll > explain why, > since it isn't obvious without some knowledge of the

Re: staging-COMEDI: Fine-tuning for three functions

2016-12-08 Thread SF Markus Elfring
> You do realize that I no longer take patches from you for any of the > subsystems I maintain, right? Not so far. It seems that you would like to present new information for our challenging collaboration. > This patch series is one reason why... I hope that corresponding disagreements around

[PATCH 1/5] staging: comedi: serial2002: Combine four kcalloc() calls into one in serial2002_setup_subdevs()

2016-12-08 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 8 Dec 2016 07:37:29 +0100 The function "kcalloc" was called in three cases by the function "serial2002_setup_subdevs" without checking immediately if it failed. This issue was detected by using the Coccinelle software. * Perform the desired memory allocation (and

[PATCH 5/5] staging: comedi: usbduxsigma: Move an assignment in usbduxsigma_alloc_usb_buffers()

2016-12-08 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 8 Dec 2016 11:20:38 +0100 Move one assignment for the local variable "usb" so that its setting will only be performed after some memory allocations succeeded by this function. Signed-off-by: Markus Elfring --- drivers/staging/comedi/drivers/usbduxsigma.c | 3 ++-

[PATCH 4/5] staging: comedi: usbduxsigma: Split a condition check in usbduxsigma_alloc_usb_buffers()

2016-12-08 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 8 Dec 2016 11:15:40 +0100 The functions "kcalloc" and "kzalloc" were called in four cases by the function "usbduxsigma_alloc_usb_buffers" without checking immediately if they succeded. This issue was detected by using the Coccinelle software. Allocated memory was

[PATCH 3/5] staging: comedi: usbdux: Move an assignment in usbdux_alloc_usb_buffers()

2016-12-08 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 8 Dec 2016 10:13:56 +0100 Move one assignment for the local variable "usb" so that its setting will only be performed after some memory allocations succeeded by this function. Signed-off-by: Markus Elfring --- drivers/staging/comedi/drivers/usbdux.c | 3 ++- 1 f

[PATCH 2/5] staging: comedi: usbdux: Split a condition check in usbdux_alloc_usb_buffers()

2016-12-08 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 8 Dec 2016 10:01:54 +0100 The functions "kcalloc" and "kzalloc" were called in four cases by the function "usbdux_alloc_usb_buffers" without checking immediately if they succeded. This issue was detected by using the Coccinelle software. Allocated memory was also

[PATCH 0/5] staging-COMEDI: Fine-tuning for three functions

2016-12-08 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 8 Dec 2016 11:37:37 +0100 Some update suggestions were taken into account from static source code analysis. Markus Elfring (5): Combine four kcalloc() calls into one in serial2002_setup_subdevs() Split a condition check in usbdux_alloc_usb_buffers() Move an

[PATCH] staging/lustre/llite: Use memdup_user() rather than duplicating its implementation

2016-08-21 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 21 Aug 2016 11:30:57 +0200 Reuse existing functionality from memdup_user() instead of keeping duplicate source code. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/staging/lustre/lustre/llite/dir.c | 12 +++--

Re: staging: ks7010: Replace three printk() calls by pr_err()

2016-08-13 Thread SF Markus Elfring
> Really now, this is basic fixes and cleanups, I agree to this view to some degree. > you have been asked many times in the past to move on beyond these, It is more useful when more severe bugs or bigger software improvements can be found. Which source code clean-ups are picked better up by o

Re: [PATCH v2 00/10] staging: ks7010: Fine-tuning for a SDIO card driver

2016-08-13 Thread SF Markus Elfring
> I added some Acked- and Reviewed-by tags last time. I noticed this of course. > Did the patches change Yes. - The amount of source code which I touched in this software module is different for the second series. > or why didn't you add them? I imagined that your acknowledgements to the pre

Re: staging: ks7010: Replace three printk() calls by pr_err()

2016-08-13 Thread SF Markus Elfring
> You might have noticed I also wrote in the same reply: > > "All of these pr_fmt uses are redundant as pr_err already does pr_fmt" I admit that I made another software development mistake there. - It might not matter much when a final fix could be to get rid of the three affected logging calls

Re: staging: ks7010: Replace three printk() calls by pr_err()

2016-08-13 Thread SF Markus Elfring
> I think pr_ is OK if reworking the code > to support dev_ is not easy. Thanks for this explanation. - It sounds more constructive than the previous short feedback "Not correct". >> Would you accept that another update will be appended to the discussed patch >> series? > > No. Patches shoul

Re: staging: ks7010: Replace three printk() calls by pr_err()

2016-08-13 Thread SF Markus Elfring
>> Prefer usage of the macro "pr_err" over the interface "printk". > Not correct A checkpatch warning like "PREFER_PR_LEVEL" can point additional possibilities out for this use case. Would you like to introduce any of the higher level logging functions instead? >> diff --git a/drivers/staging/k

  1   2   3   >