[PATCH] staging: greybus: Remove unnecessary platform_set_drvdata

2017-07-26 Thread Amitoj Kaur Chawla
platform_device *pdev; @@ - platform_set_drvdata(pdev, NULL); // Signed-off-by: Amitoj Kaur Chawla --- drivers/staging/greybus/arche-platform.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/greybus/arche-platform.c b/drivers/staging/greybus/arche-platform.c index eced2d2

[PATCH] staging: unisys: visorchipset: constify attribute_group structure

2017-07-26 Thread Amitoj Kaur Chawla
/visorbus/visorchipset.o File size after: text data bss dec hex filename 242206120 448 307887844 drivers/staging/unisys/visorbus/visorchipset.o This change was made with the help of Coccinelle. Signed-off-by: Amitoj Kaur Chawla --- drivers/staging/unisys/visorbus

[PATCH] staging: unisys: visorbus_main: constify attribute_group structures

2017-07-25 Thread Amitoj Kaur Chawla
/visorbus/visorbus_main.o File size after: text data bss dec hex filename 144087112 832 223525750 drivers/staging/unisys/visorbus/visorbus_main.o This change was made with the help of Coccinelle. Signed-off-by: Amitoj Kaur Chawla --- drivers/staging/unisys/visorbus

[PATCH v2] staging: media: atomisp: Use kvfree() instead of kfree()/vfree()

2017-07-10 Thread Amitoj Kaur Chawla
: // @@ expression a; @@ - if(...) { vfree(a); } - else { kfree(a); } + kvfree(a); // Signed-off-by: Amitoj Kaur Chawla --- Changes in v2: -Remove wrapper function .../staging/media/atomisp/pci/atomisp2/atomisp_cmd.c | 19 +++ .../staging/media/atomisp/pci/atomisp2

Re: [PATCH 2/2] staging: media: atomisp2: Replace kfree()/vfree() with kvfree()

2017-07-08 Thread Amitoj Kaur Chawla
On Sat, Jul 8, 2017 at 4:58 AM, Bernd Petrovitsch wrote: > On Fri, 2017-07-07 at 20:41 -0400, Amitoj Kaur Chawla wrote: > [...] >> --- a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c >> +++ b/drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c >> @

[PATCH 2/2] staging: media: atomisp2: Replace kfree()/vfree() with kvfree()

2017-07-07 Thread Amitoj Kaur Chawla
); } - else { kfree(a); } + kvfree(a); @@ expression a; @@ - if(...) { kfree(a); } - else { vfree(a); } + kvfree(a); // Signed-off-by: Amitoj Kaur Chawla --- drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers

[PATCH 1/2] staging: media: atomisp2: css2400: Replace kfree()/vfree() with kvfree()

2017-07-07 Thread Amitoj Kaur Chawla
); @@ expression a; @@ - if(...) { kfree(a); } - else { vfree(a); } + kvfree(a); // Signed-off-by: Amitoj Kaur Chawla --- drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400

[PATCH] staging: comedi: Use offset_in_page macro

2017-07-03 Thread Amitoj Kaur Chawla
Use offset_in_page macro instead of (var & ~PAGE_MASK) The Coccinelle semantic patch used to make this change is as follows: // @@ unsigned long p; @@ - p & ~PAGE_MASK + offset_in_page(p) // Signed-off-by: Amitoj Kaur Chawla --- drivers/staging/comedi/comedi_buf.c | 2 +- 1 file ch

[PATCH] staging: media: atomisp: Remove unnecessary return statement in void function

2017-06-29 Thread Amitoj Kaur Chawla
Return statement at the end of a void function is useless. The Coccinelle semantic patch used to make this change is as follows: // @@ identifier f; expression e; @@ void f(...) { <... - return e; ...> } // Signed-off-by: Amitoj Kaur Chawla --- drivers/staging/media/atomisp/pci/at

[PATCH] staging: rtl8723bs: Remove unnecessary cast in kfree

2017-06-14 Thread Amitoj Kaur Chawla
Remove unnecassary casts in the argument to kfree. Found using Coccinelle. The semantic patch used to find this is as follows: // @@ type T; expression *f; @@ - kfree((T *)(f)); + kfree(f); // Signed-off-by: Amitoj Kaur Chawla --- drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 14

[PATCH v2] staging: most: hdm-dim2: Remove possible dereference error

2016-03-19 Thread Amitoj Kaur Chawla
ntroduced by the commit due to change in control flow by returning PTR_ERR immediately rather than returning at the end of the function since we do not need to free anything. Signed-off-by: Amitoj Kaur Chawla --- Changes in v2: -Revised commit message drivers/staging/most/hdm-dim2/di

[PATCH] staging: most: hdm-dim2: Remove possible dereference error

2016-03-19 Thread Amitoj Kaur Chawla
ng by returning PTR_ERR immediately rather than storing in a variable and returning at the end of the function since we do not need to free anything. Signed-off-by: Amitoj Kaur Chawla --- drivers/staging/most/hdm-dim2/dim2_hdm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH] staging: most: hdm-dim2: Remove possible dereference error

2016-03-19 Thread Amitoj Kaur Chawla
On Fri, Mar 18, 2016 at 7:44 PM, Andrey Shvetsov wrote: > On Fri, Mar 18, 2016 at 06:32:15PM +0530, Amitoj Kaur Chawla wrote: >> Commit 3eced21a5afb ("staging: most: hdm-dim2: Replace request_irq >> with devm_request_irq") introduced the following static checker >&

Re: [PATCH 1/2] Staging: atm: fix 'endianess' spelling to 'endianness' in fore200e.c This is a patch to the fore200e that fixes the spelling of 'endianess' to the correct one, that is, 'endianness' fo

2016-03-09 Thread Amitoj Kaur Chawla
On Thu, Mar 10, 2016 at 11:00 AM, rneha725 wrote: > Signed-off-by: Neha Rani > --- Hi Neha, You should ideally submit patches for drivers/staging/ as a newbie and not other drivers. Other than that, Your subject is too long and you haven't written a commit message, A better way to write the su

[RFC] staging: gdm724x: gdm_usb: Remove create_workqueue()

2016-02-28 Thread Amitoj Kaur Chawla
time exit path runs. Signed-off-by: Amitoj Kaur Chawla Acked-by: Tejun Heo --- Only compile tested. drivers/staging/gdm724x/gdm_usb.c | 34 -- 1 file changed, 8 insertions(+), 26 deletions(-) diff --git a/drivers/staging/gdm724x/gdm_usb.c b/drivers/staging

[RFC] staging: unisys: visornic: Remove create_singlethread_workqueue()

2016-02-28 Thread Amitoj Kaur Chawla
to system_wq should not break anything. cancel_work_sync() is used to ensure that work is not pending or executing on any CPU. Signed-off-by: Amitoj Kaur Chawla Acked-by: Tejun Heo --- Only compile tested. drivers/staging/unisys/visornic/visornic_main.c | 21 ++--- 1 file

[RFC] staging: unisys: visorbus: visorchipset: Remove create_singlethread_workqueue()

2016-02-28 Thread Amitoj Kaur Chawla
concurrency level by switching to system_wq should not break anything. cancel_delayed_work_sync() is used to ensure that work is not pending or executing on any CPU. Signed-off-by: Amitoj Kaur Chawla Acked-by: Tejun Heo --- Only compile tested. drivers/staging/unisys/visorbus/visorchipset.c | 23

[PATCH] rdma: amso1100: c2_provider: Use netdev_dbg()

2016-02-06 Thread Amitoj Kaur Chawla
: Amitoj Kaur Chawla --- drivers/staging/rdma/amso1100/c2_provider.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rdma/amso1100/c2_provider.c b/drivers/staging/rdma/amso1100/c2_provider.c index e44ad22..75a7de5 100644 --- a/drivers/staging/rdma/amso1100

Re: [PATCH 1/3] staging: dgnc: Patch includes the checkpatch fixes

2015-12-14 Thread Amitoj Kaur Chawla
On Tue, Dec 15, 2015 at 7:28 AM, Sanidhya Solanki wrote: > > Patch contains the spacing fixes that led to checkpatch.pl warnings. > > Signed-off-by: Sanidhya Solanki > --- > drivers/staging/dgnc/dgnc_cls.c| 4 +- > drivers/staging/dgnc/dgnc_driver.h | 8 -- > drivers/staging/dgnc/dgnc_ne

[PATCH] staging: rdma: amso1100: Remove unnecessary variables

2015-11-07 Thread Amitoj Kaur Chawla
Remove unnecessary variable 'err' from functions c2_reject() and c2_service_destroy() since it can be replaced by a single line of code instead. Signed-off-by: Amitoj Kaur Chawla --- drivers/staging/rdma/amso1100/c2_provider.c | 10 ++ 1 file changed, 2 insertions(+), 8

[PATCH] staging: lustre: obdclass: Move extern declarations to header files

2015-11-07 Thread Amitoj Kaur Chawla
This patch moves extern declarations to respective header files. This patch also removes extern keyword from function declarations since functions have the extern specifier by default. Signed-off-by: Amitoj Kaur Chawla --- drivers/staging/lustre/lustre/obdclass/cl_internal.h | 3 +++ drivers

[PATCH] staging: lustre: lnet: klnds: socklnd: Move extern declarations to header

2015-11-06 Thread Amitoj Kaur Chawla
This patch moves extern declarations in socklnd_lib.c to the respective header file, 'socklnd.h'. This patch also removes extern keyword from function declarations since functions have the extern specifier by default. Signed-off-by: Amitoj Kaur Chawla --- drivers/staging/lustre/

[PATCH] staging: lustre: lnet: selftest: Move extern declarations to headers

2015-11-05 Thread Amitoj Kaur Chawla
This patch moves extern declarations to respective header files. This patch also removes extern keyword from function declarations since functions have the extern specifier by default. Signed-off-by: Amitoj Kaur Chawla --- drivers/staging/lustre/lnet/selftest/console.c | 4 drivers

[PATCH v2] staging: rtl8712: rtl871x_sta_mgt: Remove wrapper function

2015-11-04 Thread Amitoj Kaur Chawla
Remove wrapper function mfree_sta_priv_lock() that can be replaced by a direct call to mfree_all_stainfo(). Signed-off-by: Amitoj Kaur Chawla --- Changes in v2: -Removed trailing whitespace drivers/staging/rtl8712/rtl871x_sta_mgt.c | 9 ++--- 1 file changed, 2 insertions(+), 7

[PATCH v4] staging: rdma: amso1100: c2: Remove wrapper function

2015-11-04 Thread Amitoj Kaur Chawla
This patch removes the c2_print_macaddr() wrapper function which calls the pr_debug standard kernel function only. c2_print_macaddr() has been replaced by directly calling pr_debug(). Signed-off-by: Amitoj Kaur Chawla --- Changes in v2: -Removed comment added in previous version Changes

[PATCH] Staging: sm750fb: Fix C99 Comments

2015-06-19 Thread Amitoj Kaur Chawla
Used C89 instead of C99 Comments and removed C99 comments performing prints only. Problem found using checkpatch.pl ERROR: do not use C99 // comments Signed-off-by: Amitoj Kaur Chawla --- drivers/staging/sm750fb/ddk750_chip.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions

[PATCH] Staging: sm750fb: Remove space after parenthesis

2015-04-08 Thread Amitoj Kaur Chawla
Fixed error by removing space after open parenthesis '(' Problem found using checkpatch.pl ERROR: space prohibited after that open parenthesis '(' Signed-off-by: Amitoj Kaur Chawla --- drivers/staging/sm750fb/ddk750_chip.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deleti

[PATCH] Staging: sm750fb: Remove extra parentheses around right bit shift operation

2015-04-04 Thread Amitoj Kaur Chawla
ession e, e1; identifier f; constant c; @@ e1 = f(..., -(e +e << -c) +c ,...); Signed-off-by: Amitoj Kaur Chawla --- drivers/staging/sm750fb/sm750.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c inde

Re: [PATCH] Staging: rtl8188eu: Remove zero testing pointer typed value

2015-04-03 Thread Amitoj Kaur Chawla
On Fri, Apr 3, 2015 at 10:21 PM, Dan Carpenter wrote: > > On Fri, Apr 03, 2015 at 10:12:11PM +0530, Amitoj Kaur Chawla wrote: > > Removes variable comparison with 0 by using !. > > Sometimes testing for zero makes sense. When you write code, you are > telling a story. If

[PATCH] Staging: rtl8188eu: Remove zero testing pointer typed value

2015-04-03 Thread Amitoj Kaur Chawla
ion *E; @@ ( E == - 0 + NULL | E != - 0 + NULL | - 0 + NULL == E | - 0 + NULL != E ) Signed-off-by: Amitoj Kaur Chawla --- drivers/staging/rtl8188eu/hal/odm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/odm.c b/drivers/staging/rtl

[PATCH] sm750fb: Fix indentation, spacing and switch-case

2015-03-20 Thread Amitoj Kaur Chawla
Fix the spacing problems with correct indentation and correct use of braces and spacing in switch-case statements. Signed-off-by: Amitoj Kaur Chawla --- drivers/staging/sm750fb/ddk750_chip.c | 63 +-- 1 file changed, 31 insertions(+), 32 deletions(-) diff --git

[PATCH] sm750fb: Fix C99 comment and if-else braces

2015-03-20 Thread Amitoj Kaur Chawla
The edits have been made to fix C99 Comment and properly indent the if-else statements with the braces. Also, to use tabs instead of spaces. Signed-off-by: Amitoj Kaur Chawla --- drivers/staging/sm750fb/ddk750_chip.c | 35 ++- 1 file changed, 14 insertions

[PATCH] sm750fb: Fix Comment and if else braces

2015-03-19 Thread Amitoj Kaur Chawla
The edits have been made to add a space before the comment and the errors in braces in the if-else statements. Previously in commit 2d34f53f1065878cd881ac61a183f8e836583d51, removed the C99 comments and errors in if-else indentation and braces. Signed-off-by: Amitoj Kaur Chawla --- drivers

[PATCH] sm750fb: Fix C99 Comments and if else braces

2015-03-19 Thread Amitoj Kaur Chawla
The edits have been made to remove C99 Comments and properly indent the if-else statements in the file while taking care of the braces according to Linux coding style. Signed-off-by: Amitoj Kaur Chawla --- drivers/staging/sm750fb/ddk750_chip.c | 25 +++-- 1 file changed, 11

[PATCH] octeon-usb: fix 'too many leading tabs'

2015-03-18 Thread Amitoj Kaur Chawla
This file contained a lot of warnings of line of over 80 characters and that the code needs to be refactored due to nested if else conditions. The file was accordingly edited to remove some of the warnings. Signed-off-by: Amitoj Kaur Chawla --- drivers/staging/octeon-usb/octeon-hcd.c | 8

[PATCH octeon-usb] fix 'line over 80 characters'

2015-03-18 Thread Amitoj Kaur Chawla
This file contained a warning of a line being over 80 characters and so the file has been edited to remove that warning. Signed-off-by: Amitoj Kaur Chawla --- drivers/staging/octeon-usb/octeon-hcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/octeon-usb