[PATCH v2] staging: media: Remove unused function atomisp_set_stop_timeout()

2017-03-12 Thread simran singhal
(...) { -return; } Signed-off-by: simran singhal <singhalsimr...@gmail.com> --- v2: -cc the patch to more developers drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c | 1 - drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat.h | 1 - drivers/staging/media/atomi

Re: [PATCH v1] staging: media: Remove unused function atomisp_set_stop_timeout()

2017-03-12 Thread SIMRAN SINGHAL
On Sun, Mar 12, 2017 at 7:24 PM, Greg KH <gre...@linuxfoundation.org> wrote: > On Fri, Mar 10, 2017 at 07:05:05PM +0530, simran singhal wrote: >> The function atomisp_set_stop_timeout on being called, simply returns >> back. The function hasn't been mentioned in the TODO and

[PATCH v1] staging: media: Remove unused function atomisp_set_stop_timeout()

2017-03-10 Thread simran singhal
(...) { -return; } Signed-off-by: simran singhal <singhalsimr...@gmail.com> --- v1: -Change Subject to include name of function -change commit message to include the coccinelle script drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c | 1 - drivers/staging/media/atomi

[PATCH 0/2] staging: media: Remove parentheses from return arguments

2017-03-10 Thread simran singhal
This patch-series removes unnecessary parantheses from return arguments. simran singhal (2): staging: css2400/sh_css: Remove parentheses from return arguments staging: sh_css_firmware: Remove parentheses from return arguments .../media/atomisp/pci/atomisp2/css2400/sh_css.c | 20

[PATCH 2/2] staging: sh_css_firmware: Remove parentheses from return arguments

2017-03-10 Thread simran singhal
The sematic patch used for this is: @@ identifier i; constant c; @@ return - ( \(i\|-i\|i(...)\|c\) - ) ; Signed-off-by: simran singhal <singhalsimr...@gmail.com> Acked-by: Julia Lawall <julia.law...@lip6.fr> --- drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_fi

[PATCH 1/2] staging: css2400/sh_css: Remove parentheses from return arguments

2017-03-10 Thread simran singhal
The sematic patch used for this is: @@ identifier i; constant c; @@ return - ( \(i\|-i\|i(...)\|c\) - ) ; Signed-off-by: simran singhal <singhalsimr...@gmail.com> Acked-by: Julia Lawall <julia.law...@lip6.fr> --- .../media/atomisp/pci/atomisp2/css2400/sh_css

[PATCH 2/3] staging: vpfe_mc_capture: Clean up tests if NULL returned on failure

2017-03-09 Thread simran singhal
Some functions like kmalloc/kzalloc return NULL on failure. When NULL represents failure, !x is commonly used. This was done using Coccinelle: @@ expression *e; identifier l1; @@ e = \(kmalloc\|kzalloc\|kcalloc\|devm_kzalloc\)(...); ... - e == NULL + !e Signed-off-by: simran singhal

[PATCH 1/3] staging: atomisp_fops: Clean up tests if NULL returned on failure

2017-03-09 Thread simran singhal
Some functions like kmalloc/kzalloc return NULL on failure. When NULL represents failure, !x is commonly used. This was done using Coccinelle: @@ expression *e; identifier l1; @@ e = \(kmalloc\|kzalloc\|kcalloc\|devm_kzalloc\)(...); ... - e == NULL + !e Signed-off-by: simran singhal

[PATCH 3/3] staging: lirc_zilog: Clean up tests if NULL returned on failure

2017-03-09 Thread simran singhal
Some functions like kmalloc/kzalloc return NULL on failure. When NULL represents failure, !x is commonly used. This was done using Coccinelle: @@ expression *e; identifier l1; @@ e = \(kmalloc\|kzalloc\|kcalloc\|devm_kzalloc\)(...); ... - e == NULL + !e Signed-off-by: simran singhal

[PATCH 0/3] staging: media: Clean up tests if NULL returned on failure

2017-03-09 Thread simran singhal
This patch series tests if functions like kmalloc/kzalloc return NULL on failure. When NULL represents failure, !x is commonly used. simran singhal (3): staging: atomisp_fops: Clean up tests if NULL returned on failure staging: vpfe_mc_capture: Clean up tests if NULL returned on failure

[PATCH v1 5/7] staging: gc2235: Remove multiple assignments

2017-03-09 Thread simran singhal
Remove multiple assignments by factorizing them. Problem found using checkpatch.pl CHECK: multiple assignments should be avoided Signed-off-by: simran singhal <singhalsimr...@gmail.com> --- drivers/staging/media/atomisp/i2c/gc2235.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)

[PATCH v1 7/7] staging: gc2235: Do not use multiple blank lines

2017-03-09 Thread simran singhal
Remove multiple blank lines. Problem found using checkpatch.pl "CHECK: Please don't use multiple blank lines". Signed-off-by: simran singhal <singhalsimr...@gmail.com> --- drivers/staging/media/atomisp/i2c/gc2235.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drive

[PATCH v1 6/7] staging: gc2235: Use x instead of x != NULL

2017-03-09 Thread simran singhal
Use x instead of x != NULL . This patch removes the explicit NULL comparisons.This issue is found by checkpatch.pl script. Signed-off-by: simran singhal <singhalsimr...@gmail.com> --- drivers/staging/media/atomisp/i2c/gc2235.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)

[PATCH v1 4/7] staging: gc2235: Remove blank line before '}' and after '{' braces

2017-03-09 Thread simran singhal
Remove unneeded blank lines preceding/following '}' and '{' braces, as pointed out by checkpatch. This patch addresses the following checkpatch checks: CHECK: Blank lines aren't necessary before a close brace '}' CHECK: Blank lines aren't necessary after an open brace '{' Signed-off-by: simran

[PATCH v1 3/7] staging: gc2235: Replace NULL with "!"

2017-03-09 Thread simran singhal
Use ! in comparison tests using "==NULL" rather than moving the "==NULL" to the right side of the test. Addesses multiple instances of the checkpatch.pl warning: WARNING: Comparisons should place the constant on the right side of the test Signed-off-by: simran singhal <s

[PATCH v1 2/7] staging: gc2235: Add blank line after a declaration

2017-03-09 Thread simran singhal
Add blank line after a declaration. Problem found using checkpatch. This patch fixes these warning messages found by checkpatch.pl: WARNING : Missing a blank line after declarations. Signed-off-by: simran singhal <singhalsimr...@gmail.com> --- drivers/staging/media/atomisp/i2c/gc2235

[PATCH v1 1/7] staging: gc2235: Remove unnecessary typecast of c90 int constant

2017-03-09 Thread simran singhal
This patch removes unnecessary typecast of c90 int constant. WARNING: Unnecessary typecast of c90 int constant Signed-off-by: simran singhal <singhalsimr...@gmail.com> --- drivers/staging/media/atomisp/i2c/gc2235.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff

[PATCH v1 0/7] staging: gc2235: Multiple checkpatch issues

2017-03-09 Thread simran singhal
v1: -change the subject of all the patches of the patch-series simran singhal (7): staging: gc2235: Remove unnecessary typecast of c90 int constant staging: gc2235: Add blank line after a declaration staging: gc2235: Replace NULL with "!" staging: gc2235: Remove blank l

[PATCH] staging: media: Remove unnecessary function and its call

2017-03-04 Thread simran singhal
The function atomisp_set_stop_timeout on being called, simply returns back. The function hasn't been mentioned in the TODO and doesn't have FIXME code around. Hence, atomisp_set_stop_timeout and its calls have been removed. Signed-off-by: simran singhal <singhalsimr...@gmail.com> --- d

Re: [PATCH 1/7] staging: media: Remove unnecessary typecast of c90 int constant

2017-03-03 Thread SIMRAN SINGHAL
On Fri, Mar 3, 2017 at 11:15 PM, Sakari Ailus <sakari.ai...@iki.fi> wrote: > Hi Simran, > > On Fri, Mar 03, 2017 at 01:21:56AM +0530, simran singhal wrote: >> This patch removes unnecessary typecast of c90 int constant. >> >> WARNING: Unnecessary typecast of

[PATCH] staging: media: Remove parentheses from return arguments

2017-03-03 Thread simran singhal
The sematic patch used for this is: @@ identifier i; constant c; @@ return - ( \(i\|-i\|i(...)\|c\) - ) ; Signed-off-by: simran singhal <singhalsimr...@gmail.com> --- .../media/atomisp/pci/atomisp2/css2400/sh_css.c | 20 ++-- .../atomisp/pci/atomisp2/c

[PATCH 1/7] staging: media: Remove unnecessary typecast of c90 int constant

2017-03-02 Thread simran singhal
This patch removes unnecessary typecast of c90 int constant. WARNING: Unnecessary typecast of c90 int constant Signed-off-by: simran singhal <singhalsimr...@gmail.com> --- drivers/staging/media/atomisp/i2c/gc2235.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff

[PATCH 2/7] staging: media: Add blank line after a declaration

2017-03-02 Thread simran singhal
Add blank line after a declaration. Problem found using checkpatch. This patch fixes these warning messages found by checkpatch.pl: WARNING : Missing a blank line after declarations. Signed-off-by: simran singhal <singhalsimr...@gmail.com> --- drivers/staging/media/atomisp/i2c/gc2235

[PATCH 7/7] staging: media: Do not use multiple blank lines

2017-03-02 Thread simran singhal
Remove multiple blank lines. Problem found using checkpatch.pl "CHECK: Please don't use multiple blank lines". Signed-off-by: simran singhal <singhalsimr...@gmail.com> --- drivers/staging/media/atomisp/i2c/gc2235.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drive

[PATCH 6/7] staging: media: Use x instead of x != NULL

2017-03-02 Thread simran singhal
Use x instead of x != NULL . This patch removes the explicit NULL comparisons.This issue is found by checkpatch.pl script. Signed-off-by: simran singhal <singhalsimr...@gmail.com> --- drivers/staging/media/atomisp/i2c/gc2235.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)

[PATCH 5/7] staging: media: Remove multiple assignments

2017-03-02 Thread simran singhal
Remove multiple assignments by factorizing them. Problem found using checkpatch.pl CHECK: multiple assignments should be avoided Signed-off-by: simran singhal <singhalsimr...@gmail.com> --- drivers/staging/media/atomisp/i2c/gc2235.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)

[PATCH 4/7] staging: media: Remove blank line before '}' and after '{' braces

2017-03-02 Thread simran singhal
Remove unneeded blank lines preceding/following '}' and '{' braces, as pointed out by checkpatch. This patch addresses the following checkpatch checks: CHECK: Blank lines aren't necessary before a close brace '}' CHECK: Blank lines aren't necessary after an open brace '{' Signed-off-by: simran

[PATCH 3/7] staging: media: Replace NULL with "!"

2017-03-02 Thread simran singhal
Use ! in comparison tests using "==NULL" rather than moving the "==NULL" to the right side of the test. Addesses multiple instances of the checkpatch.pl warning: WARNING: Comparisons should place the constant on the right side of the test Signed-off-by: simran singhal <s