[PATCH 4/7] [media] ov9640: Delete an error message for a failed memory allocation in ov9640_probe()

2017-09-02 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 2 Sep 2017 16:34:27 +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/media/i2c/soc_camera/ov9640.c | 5 + 1 file changed, 1 inse

[PATCH 5/7] [media] ov9640: Improve a size determination in ov9640_probe()

2017-09-02 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 2 Sep 2017 16:37:03 +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 dete

[PATCH 6/7] [media] ov9740: Delete an error message for a failed memory allocation in ov9740_probe()

2017-09-02 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 2 Sep 2017 16:44:36 +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/media/i2c/soc_camera/ov9740.c | 4 +--- 1 file changed, 1 inser

[PATCH 7/7] [media] ov9740: Improve a size determination in ov9740_probe()

2017-09-02 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 2 Sep 2017 16:46:03 +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 dete

[PATCH 0/3] [media] cx18: Adjustments for seven function implementations

2017-09-02 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 2 Sep 2017 20:03:45 +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 Improve a size determination Adjust ten checks for null pointers drivers

[PATCH 1/3] [media] cx18: Delete an error message for a failed memory allocation in cx18_probe()

2017-09-02 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 2 Sep 2017 19:39:56 +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/media/pci/cx18/cx18-driver.c | 6 ++ 1 file changed, 2 inse

[PATCH 2/3] [media] cx18: Improve a size determination in cx18_probe()

2017-09-02 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 2 Sep 2017 19:42:12 +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 dete

[PATCH 3/3] [media] cx18: Adjust ten checks for null pointers

2017-09-02 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 2 Sep 2017 19:49:23 +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 plac

[PATCH 0/7] [media] Mantis: Adjustments for three function implementations

2017-09-02 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 2 Sep 2017 22:18:22 +0200 A few update suggestions were taken into account from static source code analysis. Markus Elfring (7): Delete an error message for a failed memory allocation in hopper_pci_probe() Improve a size determination in hopper_pci_probe() A

[PATCH 1/7] [media] Hopper: Delete an error message for a failed memory allocation in hopper_pci_probe()

2017-09-02 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 2 Sep 2017 21:19: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 --- drivers/media/pci/mantis/hopper_cards.c | 1 - 1 file changed, 1 deleti

[PATCH 2/7] [media] Hopper: Improve a size determination in hopper_pci_probe()

2017-09-02 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 2 Sep 2017 21:21:22 +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 dete

[PATCH 3/7] [media] Hopper: Adjust a null pointer check in two functions

2017-09-02 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 2 Sep 2017 21:25:50 +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 4/7] [media] Hopper: Delete an unnecessary variable initialisation in hopper_pci_probe()

2017-09-02 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 2 Sep 2017 21:50:55 +0200 The variable "err" will be set to an appropriate value a bit later. Thus omit the explicit initialisation at the beginning. Signed-off-by: Markus Elfring --- drivers/media/pci/mantis/hopper_cards.c | 2 +- 1 file changed, 1 insertion(+)

[PATCH 5/7] [media] Mantis: Delete an error message for a failed memory allocation in mantis_pci_probe()

2017-09-02 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 2 Sep 2017 21:55: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 --- drivers/media/pci/mantis/mantis_cards.c | 4 +--- 1 file changed, 1 ins

[PATCH 6/7] [media] Mantis: Improve a size determination in mantis_pci_probe()

2017-09-02 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 2 Sep 2017 21:56:07 +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 dete

[PATCH 7/7] [media] Mantis: Delete an unnecessary variable initialisation in mantis_pci_probe()

2017-09-02 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 2 Sep 2017 22:05:22 +0200 The variable "err" will eventually be set to an appropriate value a bit later. Thus omit the explicit initialisation at the beginning. Signed-off-by: Markus Elfring --- drivers/media/pci/mantis/mantis_cards.c | 2 +- 1 file changed, 1 i

[PATCH 0/2] [media] Motion Eye: Adjustments for meye_probe()

2017-09-03 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 3 Sep 2017 15:54:45 +0200 Two update suggestions were taken into account from static source code analysis. Markus Elfring (2): Delete three error messages for a failed memory allocation Adjust two function calls together with a variable assignment drivers/me

[PATCH 1/2] [media] meye: Delete three error messages for a failed memory allocation in meye_probe()

2017-09-03 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 3 Sep 2017 15:30:04 +0200 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/media/pci/meye/meye.c | 13 - 1 file changed, 4 inser

[PATCH 2/2] [media] meye: Adjust two function calls together with a variable assignment

2017-09-03 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 3 Sep 2017 15:41:53 +0200 The script "checkpatch.pl" pointed information out like the following. ERROR: do not use assignment in if condition Thus fix the affected source code places. Signed-off-by: Markus Elfring --- drivers/media/pci/meye/meye.c | 7 ---

[PATCH 0/7] [media] SAA71..: Adjustments for four function implementations

2017-09-03 Thread SF Markus Elfring
>From 2f421e83375df1aeef50ce053f1dbcd1366c2365 Mon Sep 17 00:00:00 2001 From: Markus Elfring Date: Sun, 3 Sep 2017 20:50:10 +0200 Subject: [PATCH 0/7] [media] SAA71..: Adjustments for four function implementations Three update suggestions were taken into account from static source code analysis.

[PATCH 1/7] [media] saa7164: Delete an error message for a failed memory allocation in saa7164_buffer_alloc()

2017-09-03 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 3 Sep 2017 17:47:41 +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/media/pci/saa7164/saa7164-buffer.c | 4 +--- 1 file changed, 1

[PATCH 2/7] [media] saa7164: Improve a size determination in two functions

2017-09-03 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 3 Sep 2017 17:53:05 +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

[PATCH 3/7] [media] Hexium Gemini: Delete an error message for a failed memory allocation in hexium_attach()

2017-09-03 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 3 Sep 2017 19:23:37 +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/media/pci/saa7146/hexium_gemini.c | 5 ++--- 1 file changed, 2

[PATCH 4/7] [media] Hexium Gemini: Improve a size determination in hexium_attach()

2017-09-03 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 3 Sep 2017 19:51:46 +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 dete

[PATCH 5/7] [media] Hexium Orion: Delete an error message for a failed memory allocation in hexium_probe()

2017-09-03 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 3 Sep 2017 19:55:25 +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/media/pci/saa7146/hexium_orion.c | 4 +--- 1 file changed, 1 in

[PATCH 6/7] [media] Hexium Orion: Improve a size determination in hexium_probe()

2017-09-03 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 3 Sep 2017 20:00:17 +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 dete

[PATCH 7/7] [media] Hexium Orion: Adjust one function call together with a variable assignment

2017-09-03 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 3 Sep 2017 20:12:36 +0200 The script "checkpatch.pl" pointed information out like the following. ERROR: do not use assignment in if condition Thus fix the affected source code place. Signed-off-by: Markus Elfring --- drivers/media/pci/saa7146/hexium_orion.c |

[PATCH 0/6] [media] Atmel: Adjustments for seven function implementations

2017-09-04 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 4 Sep 2017 21:44:55 +0200 A few update suggestions were taken into account from static source code analysis. Markus Elfring (6): Delete an error message for a failed memory allocation in isc_formats_init() Improve a size determination in isc_formats_init() A

[PATCH 1/6] [media] atmel-isc: Delete an error message for a failed memory allocation in isc_formats_init()

2017-09-04 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 4 Sep 2017 20:33:58 +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/media/platform/atmel/atmel-isc.c | 4 +--- 1 file changed, 1 in

[PATCH 2/6] [media] atmel-isc: Improve a size determination in isc_formats_init()

2017-09-04 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 4 Sep 2017 20:50:22 +0200 Replace the specification of a data type 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: Markus El

[PATCH 3/6] [media] atmel-isc: Adjust three checks for null pointers

2017-09-04 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 4 Sep 2017 20:54:20 +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 4/6] [media] atmel-isi: Delete an error message for a failed memory allocation in two functions

2017-09-04 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 4 Sep 2017 21:21:25 +0200 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/media/platform/atmel/atmel-isi.c | 8 ++-- 1 file changed

[PATCH 5/6] [media] atmel-isi: Improve three size determinations

2017-09-04 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 4 Sep 2017 21:27:45 +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. Signed-off-by: Markus Elfr

[PATCH 6/6] [media] atmel-isi: Adjust a null pointer check in three functions

2017-09-04 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 4 Sep 2017 21:30:48 +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] [media] blackfin: Delete an error message for a failed memory allocation in ppi_create_instance()

2017-09-07 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 7 Sep 2017 22:14: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 --- drivers/media/platform/blackfin/ppi.c | 1 - 1 file changed, 1 deletion

[PATCH 0/3] [media] DaVinci-VPBE-Display: Adjustments for some function implementations

2017-09-08 Thread SF Markus Elfring
From: Markus Elfring Date: Fri, 8 Sep 2017 14:12:10 +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 init_vpbe_layer() Improve a size determination in two functions Adjust

[PATCH 1/3] [media] DaVinci-VPBE-Display: Delete an error message for a failed memory allocation in init_vpbe_layer()

2017-09-08 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 7 Sep 2017 22:37:16 +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/media/platform/davinci/vpbe_display.c | 5 ++--- 1 file changed

[PATCH 2/3] [media] DaVinci-VPBE-Display: Improve a size determination in two functions

2017-09-08 Thread SF Markus Elfring
From: Markus Elfring Date: Fri, 8 Sep 2017 10:50:32 +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. Signed-off-by: Markus

[PATCH 3/3] [media] DaVinci-VPBE-Display: Adjust 12 checks for null pointers

2017-09-08 Thread SF Markus Elfring
From: Markus Elfring Date: Fri, 8 Sep 2017 14:00:20 +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 plac

[PATCH] [media] bdisp-debug: Replace a seq_puts() call by seq_putc() in seven functions

2017-05-04 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 4 May 2017 19:14:15 +0200 Seven 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/media/platform/sti

[PATCH 0/4] DMA-buf: Fine-tuning for four function implementations

2017-05-08 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 8 May 2017 11:05:05 +0200 A few update suggestions were taken into account from static source code analysis. Markus Elfring (4): Combine two function calls into one in dma_buf_debug_show() Improve a size determination in dma_buf_attach() Adjust a null pointe

[PATCH 1/4] dma-buf: Combine two function calls into one in dma_buf_debug_show()

2017-05-08 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 8 May 2017 10:32:44 +0200 A bit of data was put 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/dma-buf/dm

[PATCH 2/4] dma-buf: Improve a size determination in dma_buf_attach()

2017-05-08 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 8 May 2017 10:50:09 +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: Mark

[PATCH 3/4] dma-buf: Adjust a null pointer check in dma_buf_attach()

2017-05-08 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 8 May 2017 10:54:17 +0200 The script "checkpatch.pl" pointed information out like the following. Comparison to NULL could be written "!attach" Thus adjust this expression. Signed-off-by: Markus Elfring --- drivers/dma-buf/dma-buf.c | 2 +- 1 file changed, 1 in

[PATCH 4/4] dma-buf: Use seq_putc() in two functions

2017-05-08 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 8 May 2017 10:55:42 +0200 Three 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/dma-buf/sync_debug

Re: Adjustments for a lot of function implementations

2017-10-30 Thread SF Markus Elfring
> While we do not mind cleanup patches, the way you post them (one fix per file) I find it safer in this way while I was browsing through the landscape of Linux software components. > is really annoying and takes us too much time to review. It is just the case that there are so many remaining

Re: Adjustments for a lot of function implementations

2017-10-30 Thread SF Markus Elfring
Feel free to repost, but only if you organize the patch as either fixing the same type of issue for a whole subdirectory (media/usb, media/pci, etc) >> >> Just for the record, while this may work for media, it won't work for all >> subsystems. One will quickly get a complaint that

Re: Adjustments for a lot of function implementations

2017-10-30 Thread SF Markus Elfring
> Yes, and you were told not to do it I have got an other impression. > like that again. I continued with the presentation of suggestions from my selection of change possibilities. It seems that there are very different expectations for the preferred patch granularity. Can it happen again that

Re: Adjustments for a lot of function implementations

2017-10-31 Thread SF Markus Elfring
but will reject the others, not just this driver but all of them that are currently pending in our patchwork (https://patchwork.linuxtv.org). I find it very surprising that you rejected 146 useful update suggestions so easily. Feel free to repost, but only if you organize th

[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

Re: Adjustments for a lot of function implementations

2017-11-26 Thread SF Markus Elfring
> ??? I did that: either one patch per directory with the same type of change, > or one patch per driver combining all the changes for that driver. Would you like to answer my still remaining questions in any more constructive ways? Regards, Markus

[PATCH 0/3] [media] au0828-video: Fine-tuning for au0828_init_isoc()

2016-10-24 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 24 Oct 2016 22:52:10 +0200 A few update suggestions were taken into account from static source code analysis. Markus Elfring (3): Use kcalloc() Delete three error messages for a failed memory allocation Move two assignments drivers/media/usb/au0828/au0828-

[PATCH 1/3] [media] au0828-video: Use kcalloc() in au0828_init_isoc()

2016-10-24 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 24 Oct 2016 22:08:47 +0200 * 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 2/3] [media] au0828-video: Delete three error messages for a failed memory allocation

2016-10-24 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 24 Oct 2016 22:28:03 +0200 Omit extra messages 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/media/usb/au0828/au08

[PATCH 3/3] [media] au0828-video: Move two assignments in au0828_init_isoc()

2016-10-24 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 24 Oct 2016 22:44:02 +0200 Move the assignment for the data structure members "isoc_copy" and "num_bufs" behind the source code for memory allocations by this function. Signed-off-by: Markus Elfring --- drivers/media/usb/au0828/au0828-video.c | 5 ++--- 1 file c

Re: [PATCH 3/3] [media] au0828-video: Move two assignments in au0828_init_isoc()

2016-11-03 Thread SF Markus Elfring
>> From: Markus Elfring >> Date: Mon, 24 Oct 2016 22:44:02 +0200 >> >> Move the assignment for the data structure members "isoc_copy" >> and "num_bufs" behind the source code for memory allocations >> by this function. > > I don't see the point, Another explanation try … > dropping this patch.

Re: [PATCH 10/34] [media] DaVinci-VPBE: Check return value of a setup_if_config() call in vpbe_set_output()

2016-11-03 Thread SF Markus Elfring
>> From: Markus Elfring >> Date: Wed, 12 Oct 2016 09:56:56 +0200 >> >> * A function was called over the pointer "setup_if_config" in the data >> structure "venc_platform_data". But the return value was not used so far. >> Thus assign it to the local variable "ret" which will be checked with >>

Re: [PATCH 17/34] [media] DaVinci-VPFE-Capture: Improve another size determination in vpfe_enum_input()

2016-11-03 Thread SF Markus Elfring
>> @@ -1091,7 +1091,7 @@ static int vpfe_enum_input(struct file *file, void >> *priv, >> return -EINVAL; >> } >> sdinfo = &vpfe_dev->cfg->sub_devs[subdev]; >> -memcpy(inp, &sdinfo->inputs[index], sizeof(struct v4l2_input)); >> +memcpy(inp, &sdinfo->inputs[index], sizeof(

[PATCH v2 10/34] [media] DaVinci-VPBE: Check return value of a setup_if_config() call in vpbe_set_output()

2016-11-06 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 6 Nov 2016 20:40:20 +0100 * A function was called over the pointer "setup_if_config" in the data structure "venc_platform_data". But the return value was not used so far. Thus assign it to the local variable "ret" which will be checked with the next statement

[PATCH v2 17/34] [media] DaVinci-VPFE-Capture: Replace a memcpy() call by an assignment in vpfe_enum_input()

2016-11-06 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 6 Nov 2016 21:54:38 +0100 Use a direct assignment for an array element which can be set over the pointer variable "inp" instead of calling the function "memcpy" here. Suggested-by: Hans Verkuil Signed-off-by: Markus Elfring --- drivers/media/platform/davinci/vp

Re: [PATCH] [media] DaVinci-VPFE-Capture: fix error handling

2016-11-23 Thread SF Markus Elfring
> A recent cleanup had the right idea to remove the initialization > of the error variable, but missed the actual benefit of that, > which is that we get warnings if there is a bug in it. > Now we get a warning about a bug that was introduced by this cleanup: > > drivers/media/platform/davinci/vpf

Re: [patch] [media] uvcvideo: freeing an error pointer

2016-11-25 Thread SF Markus Elfring
> A recent cleanup introduced a potential dereference of -EFAULT when we > call kfree(map->menu_info). > > Fixes: 4cc5bed1caeb ("[media] uvcvideo: Use memdup_user() rather than > duplicating its implementation") > Signed-off-by: Dan Carpenter Thanks for your information. > diff --git a/driver

[PATCH 0/4] [media] bt8xx: Fine-tuning for three functions

2016-12-10 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 10 Dec 2016 21:40:12 +0100 A few update suggestions were taken into account from static source code analysis. Markus Elfring (4): One function call less in bttv_input_init() after error detection Delete two error messages for a failed memory allocation Delet

[PATCH 1/4] [media] bt8xx: One function call less in bttv_input_init() after error detection

2016-12-10 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 10 Dec 2016 09:29:24 +0100 The kfree() function was called in one case by the bttv_input_init() function during error handling even if the passed variable contained a null pointer. This issue was detected by using the Coccinelle software. * Split a condition chec

[PATCH 2/4] [media] bt8xx: Delete two error messages for a failed memory allocation

2016-12-10 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 10 Dec 2016 20:50:58 +0100 Omit extra messages for a memory allocation failure in two functions. Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf Signed-off-by: Markus Elfring --- drivers/media/pci/bt8xx/dst_c

[PATCH 3/4] [media] bt8xx: Delete unnecessary variable initialisations in ca_send_message()

2016-12-10 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 10 Dec 2016 20:56:04 +0100 Two local variables will be set to an appropriate value a bit later. Thus omit the explicit initialisation at the beginning. Signed-off-by: Markus Elfring --- drivers/media/pci/bt8xx/dst_ca.c | 5 ++--- 1 file changed, 2 insertions(+),

[PATCH 4/4] [media] bt8xx: Less function calls in dst_ca_ioctl() after error detection

2016-12-10 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 10 Dec 2016 21:30:10 +0100 The kfree() function was called in up to three cases by the dst_ca_ioctl() function during error handling even if the passed variable contained a null pointer. This issue was detected by using the Coccinelle software. * Split a conditio

Re: [media] bt8xx: One function call less in bttv_input_init() after error detection

2016-12-10 Thread SF Markus Elfring
> kfree() is safe to call on a NULL pointer. This is true. > Despite that, you have found several instances of similar constructs: Yes. - Special source code search pattern can point such places out for further considerations. > Didn't it occur to you that maybe those constructs are fine the

Re: [media] bt8xx: One function call less in bttv_input_init() after error detection

2016-12-11 Thread SF Markus Elfring
>> I would prefer a safer coding style for the corresponding >> exception handling. > > Can you please point out what is wrong in the current code Is it useful to reconsider the software situation that another memory allocation is attempted when it could be determined that a previous one failed a

Re: [media] bt8xx: One function call less in bttv_input_init() after error detection

2016-12-12 Thread SF Markus Elfring
>> I suggest to check return values immediately after each function call. >> An error situation can be detected earlier then and only the required >> clean-up functionality will be executed at the end. > > Which improvement does this bring? * How do you think about to avoid requesting additional

Re: Clarification for acceptance statistics?

2016-12-12 Thread SF Markus Elfring
> Have you proposed a similar patch that was accepted? Yes. - It happened a few times. > I don't find record of it, but I may be wrong. It is really needed to clarify the corresponding software development history any further? Regards, Markus -- To unsubscribe from this list: send the line "un

Re: Clarification for acceptance statistics?

2016-12-12 Thread SF Markus Elfring
> The question was: have you ever had a patch changing code in the form > > { > a = kmalloc(...); > b = kmalloc(...); > > if (!a || !b) > goto out; > > ... > > out: > kfree(a); > kfree(b); > } > > to something else, accepted? It seems that thi

[PATCH] [media] tw686x-kh: Delete an unnecessary check before the function call "video_unregister_device"

2016-07-17 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 17 Jul 2016 22:00:35 +0200 The video_unregister_device() 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] [media] cec: Delete an unnecessary check before the function call "rc_free_device"

2016-07-17 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 17 Jul 2016 22:52:49 +0200 The rc_free_device() 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 --- dr

[PATCH] [media] v4l2-common: Delete an unnecessary check before the function call "spi_unregister_device"

2016-07-19 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 19 Jul 2016 19:54:16 +0200 The spi_unregister_device() 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] [media] tw686x: Delete an unnecessary check before the function call "video_unregister_device"

2016-07-19 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 19 Jul 2016 21:24:26 +0200 The video_unregister_device() 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] media/i2c: Delete owner assignment

2016-08-14 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 14 Aug 2016 22:20:26 +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/media/i2c/ad9389b.c | 1 - drivers/media/i2c/adv7183

[PATCH] [media] radio-si470x-i2c: Delete owner assignment

2016-08-14 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 15 Aug 2016 07:01:56 +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/media/radio/si470x/radio-si470x-i2c.c | 1 - 1 file chang

[PATCH] [media] dvb_frontend: Use memdup_user() rather than duplicating its implementation

2016-08-19 Thread SF Markus Elfring
From: Markus Elfring Date: Fri, 19 Aug 2016 10:04:54 +0200 * Reuse existing functionality from memdup_user() instead of keeping duplicate source code. This issue was detected by using the Coccinelle software. * Return directly if this copy operation failed. * Replace the specification of d

[PATCH 0/2] uvc_v4l2: Fine-tuning for uvc_ioctl_ctrl_map()

2016-08-19 Thread SF Markus Elfring
From: Markus Elfring Date: Fri, 19 Aug 2016 11:11:01 +0200 A few update suggestions were taken into account from static source code analysis. Markus Elfring (2): Use memdup_user() rather than duplicating its implementation One function call less after error detection drivers/media/usb/uvc/

[PATCH 1/2] uvc_v4l2: Use memdup_user() rather than duplicating its implementation

2016-08-19 Thread SF Markus Elfring
From: Markus Elfring Date: Fri, 19 Aug 2016 10:50:05 +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/media/usb/uvc/uvc_v4l2.c | 11 +++ 1

[PATCH 2/2] uvc_v4l2: One function call less in uvc_ioctl_ctrl_map() after error detection

2016-08-19 Thread SF Markus Elfring
From: Markus Elfring Date: Fri, 19 Aug 2016 11:00:38 +0200 The kfree() function was called in two cases by the uvc_ioctl_ctrl_map() function during error handling even if the passed data structure element contained a null pointer. Adjust jump targets according to the Linux coding style conventio

[PATCH 0/2] [media] c8sectpfe: Deletion of a few unnecessary checks

2015-11-05 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 5 Nov 2015 19:39:32 +0100 Another update suggestion was taken into account after a patch was applied from static source code analysis. Markus Elfring (2): Delete unnecessary checks before two function calls Combine three checks into a single if block drivers

[PATCH 1/2] [media] c8sectpfe: Delete unnecessary checks before two function calls

2015-11-05 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 5 Nov 2015 18:55:19 +0100 The functions i2c_put_adapter() and module_put() test whether their argument is NULL and then return immediately. Thus the tests around their calls are not needed. This issue was detected by using the Coccinelle software. Signed-off-by:

[PATCH 2/2] [media] c8sectpfe: Combine three checks into a single if block

2015-11-05 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 5 Nov 2015 19:23:50 +0100 The variable "tsin" was checked three times in a loop iteration of the c8sectpfe_tuner_unregister_frontend() function. This implementation detail could be improved by the combination of the involved statements into a single if block so tha

[PATCH] [media] gsc-m2m: Use an unsigned data type for a variable

2015-12-19 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 19 Dec 2015 15:28:37 +0100 The data type "int" was used by the variable "ret" in the gsc_m2m_poll() function despite of the aspect that the type "unsigned int" will usually be needed for the return value from a call of the v4l2_m2m_poll() function. Improve this imp

Re: [git:media_tree/master] [media] tuners: remove unneeded checks before release_firmware()

2014-12-04 Thread SF Markus Elfring
> This is an automatic generated email to let you know that the following patch > were queued at the > http://git.linuxtv.org/media_tree.git tree: > > Subject: [media] tuners: remove uneeded checks before release_firmware() Would you like to amend a typo in the commit title? Regards, Markus --

[PATCH 0/2] [media] mn88472: Delete an unnecessary check

2015-02-01 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 1 Feb 2015 20:00:17 +0100 Another update suggestion was taken into account after a patch was applied from static source code analysis. Markus Elfring (2): Deletion of an unnecessary check before the function call "release_firmware" One function call less in mn

[PATCH 1/2] [media] mn88472: Deletion of an unnecessary check before the function call "release_firmware"

2015-02-01 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 1 Feb 2015 19:12:56 +0100 The release_firmware() 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 --- d

[PATCH 2/2] [media] mn88472: One function call less in mn88472_init() after error detection

2015-02-01 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 1 Feb 2015 19:34:37 +0100 The release_firmware() function was called in three cases by the mn88472_init() function during error handling even if the passed variable "fw" contained still a null pointer. This implementation detail could be improved by the introducti

[media] staging: bcm2048: Delete an unnecessary check before the function call "video_unregister_device"

2015-02-02 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 2 Feb 2015 13:20:23 +0100 The video_unregister_device() 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] [media] sp2: Delete an unnecessary check before the function call "kfree"

2015-02-03 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 3 Feb 2015 15:05:26 +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/medi

[PATCH] [media] V4L2: Delete an unnecessary check before the function call "media_entity_put"

2015-02-03 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 3 Feb 2015 15:27:38 +0100 The media_entity_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 --- d

[PATCH 0/2] DVB: Deletion of a few unnecessary checks

2015-02-03 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 3 Feb 2015 16:50:07 +0100 Another update suggestion was taken into account after a patch was applied from static source code analysis. Markus Elfring (2): Delete an unnecessary check before the function call "dvb_unregister_device" Less function calls in dvb_c

[PATCH 1/2] [media] DVB: Delete an unnecessary check before the function call "dvb_unregister_device"

2015-02-03 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 3 Feb 2015 16:01:40 +0100 The dvb_unregister_device() 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 2/2] [media] DVB: Less function calls in dvb_ca_en50221_init() after error detection

2015-02-03 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 3 Feb 2015 16:47:48 +0100 The functions "dvb_unregister_device" and "kfree" could still be called by the dvb_ca_en50221_init() function in the case that a previous resource allocation failed. * Corresponding details could be improved by adjustments for jump target

[PATCH] [media] stk-webcam: Delete an unnecessary check before the function call "vfree"

2015-02-03 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 3 Feb 2015 18:36:35 +0100 The vfree() 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 --- drivers/media/usb/stkwebcam/stk-web

[PATCH] [media] au0828: Delete unnecessary checks before the function call "video_unregister_device"

2015-02-03 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 3 Feb 2015 19:00:25 +0100 The video_unregister_device() 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 0/3] [media] DVB-frontends: Deletion of a few unnecessary checks

2014-11-20 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 19 Nov 2014 23:30:37 +0100 Another update suggestion was taken into account after a patch was applied from static source code analysis. Markus Elfring (3): DVB-frontends: Deletion of unnecessary checks before the function call "release_firmware" m88ds3103:

[PATCH 2/3] [media] m88ds3103: One function call less in m88ds3103_init() after error detection

2014-11-20 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 19 Nov 2014 23:20:51 +0100 The release_firmware() function was called in some cases by the m88ds3103_init() function during error handling even if the passed variable contained still a null pointer. This implementation detail could be improved by the introduction o

<    1   2   3   4   5   6   >