[PATCH] Drivers: usb: serial: Replace unsigned to unsigned int and fix line over 80 characters

2017-08-03 Thread Himanshu Jha
characters Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com> --- drivers/usb/serial/ch341.c | 19 --- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/drivers/usb/serial/ch341.c b/drivers/usb/serial/ch341.c index 351745a..f4ee53c 100644 --- a/drivers/usb/

[PATCH] Staging: wilc1000: Fix line over 80 characters

2017-08-03 Thread Himanshu Jha
This patch fixes 80 characters limit coding style issue. Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com> --- drivers/staging/wilc1000/linux_wlan.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wi

[PATCH] Staging : unisys : visorbus : visorbus_main: Fixed a brace cdoing style issue

2017-07-23 Thread Himanshu Jha
Fixed coding style issue for function declaration. Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com> --- drivers/staging/unisys/visorbus/visorbus_main.c | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/drivers/staging/unisys/visorbus/visorbus_

[PATCH] Drivers : edac : checkpatch.pl clean up

2017-07-26 Thread Himanshu Jha
Fixed 'no assignment in if condition' coding style issue and removed unnecessary spaces at the start of a line. Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com> --- drivers/edac/i82860_edac.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/driver

[PATCH] drivers: staging: rtl8192e: make const qualified argument

2017-08-22 Thread Himanshu Jha
The ether_addr_copy expects const u8* as its second argument, therefore pass const qualified argument instead of non-const argument. Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com> --- drivers/staging/rtl8192e/rtl819x_BAProc.c | 13 ++--- 1 file changed, 6 insertions

Re: [PATCH] mwifiex: Use put_unaligned_le32

2017-10-05 Thread Himanshu Jha
On Thu, Oct 05, 2017 at 10:23:37AM +0300, Kalle Valo wrote: > Himanshu Jha <himanshujha199...@gmail.com> writes: > > > Use put_unaligned_le32 rather than using byte ordering function and > > memcpy which makes code clear. > > Also, add the header file where it i

[PATCH] scsi: be2iscsi: Use kasprintf

2017-10-06 Thread Himanshu Jha
Use kasprintf instead of combination of kmalloc and sprintf. Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com> --- drivers/scsi/be2iscsi/be_main.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be

[PATCH v2] usb: wusbcore: Use put_unaligned_le32

2017-10-06 Thread Himanshu Jha
hen != tmp - memcpy(ptr, (T), ...); + put_unaligned_le32(x,ptr); ...+> @ depends on rule1 @ type j; identifier tmp; @@ - j tmp; ...when != tmp Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com> --- v2: * added correct header file. drivers/usb/wusbcore/security.c | 9 - 1

[PATCH v2] mwifiex: Use put_unaligned_le32

2017-10-06 Thread Himanshu Jha
hen != tmp - memcpy(ptr, (T), ...); + put_unaligned_le32(x,ptr); ...+> @ depends on rule1 @ type j; identifier tmp; @@ - j tmp; ...when != tmp Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com> --- v2: * added correct header file. drivers/net/wireless/marvell/mwifiex/c

[PATCH] skd: Use kmem_cache_free

2017-10-08 Thread Himanshu Jha
Use kmem_cache_free instead of kfree for freeing the memory previously allocated with kmem_cache_zalloc/kmem_cache_alloc/kmem_cache_node. Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com> --- drivers/block/skd_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

Re: [PATCH] mwifiex: Use put_unaligned_le32

2017-10-05 Thread Himanshu Jha
On Thu, Oct 05, 2017 at 11:41:38AM +0300, Kalle Valo wrote: > Himanshu Jha <himanshujha199...@gmail.com> writes: > > >> > --- a/drivers/net/wireless/marvell/mwifiex/cmdevt.c > >> > +++ b/drivers/net/wireless/marvell/mwifiex/cmdevt.c > >> > @@ -1

Re: [PATCH] mwifiex: Use put_unaligned_le32

2017-10-05 Thread Himanshu Jha
On Thu, Oct 05, 2017 at 11:02:50AM -0700, Brian Norris wrote: > On Thu, Oct 05, 2017 at 08:52:33PM +0530, Himanshu Jha wrote: > > There are various instances where a function used in file say for eg > > int func_align (void* a) > > is used and it is defined in align.h >

[PATCH v3] usb: wusbcore: Use put_unaligned_le32

2017-10-17 Thread Himanshu Jha
hen != tmp - memcpy(ptr, (T), ...); + put_unaligned_le32(x,ptr); ...+> @ depends on rule1 @ type j; identifier tmp; @@ - j tmp; ...when != tmp Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com> --- v2: -Added correct header file. v3: -Added header file should be at end of

Re: [PATCH v2] usb: wusbcore: Use put_unaligned_le32

2017-10-17 Thread Himanshu Jha
On Tue, Oct 17, 2017 at 11:51:14AM +0200, Greg KH wrote: > On Fri, Oct 06, 2017 at 08:38:07PM +0530, Himanshu Jha wrote: > > Use put_unaligned_le32 rather than using byte ordering function and > > memcpy which makes code clear. > > Also, add the header file where it is de

Re: [PATCH] scsi: be2iscsi: Use kasprintf

2017-10-11 Thread Himanshu Jha
On Tue, Oct 10, 2017 at 05:54:15PM -0400, Kyle Fortin wrote: > Hi Himanshu, > > On Oct 6, 2017, at 2:57 PM, Himanshu Jha <himanshujha199...@gmail.com> wrote: > > > > Use kasprintf instead of combination of kmalloc and sprintf. > > > > Signed-off-by: Hi

[PATCH] rsi: remove memset before memcpy

2017-08-29 Thread Himanshu Jha
calling memcpy immediately after memset with the same region of memory makes memset redundant. Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com> --- drivers/net/wireless/rsi/rsi_91x_sdio.c | 1 - drivers/net/wireless/rsi/rsi_91x_usb.c | 1 - 2 files changed, 2 deletions(-) diff

Re: [PATCH] scsi: remove memset before memcpy

2017-08-29 Thread Himanshu Jha
On Tue, Aug 29, 2017 at 12:29:35PM -0700, Joe Perches wrote: > On Wed, 2017-08-30 at 00:19 +0530, Himanshu Jha wrote: > > drivers/scsi/megaraid/megaraid_sas_fusion.c > > I don't know if you did this with coccinelle. Yes, I did this with coccinelle. > > If so, it would be

[PATCH] drm/amdkfd: remove memset before memcpy

2017-08-29 Thread Himanshu Jha
calling memcpy immediately after memset with the same region of memory makes memset redundant. Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com> --- drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/amd/

[PATCH] scsi: remove memset before memcpy

2017-08-29 Thread Himanshu Jha
calling memcpy immediately after memset with the same region of memory makes memset redundant. Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com> --- drivers/scsi/bfa/bfa_ioc.c | 1 - drivers/scsi/megaraid/megaraid_sas_fusion.c | 2 -- drivers/scsi/qla4xxx/ql

[PATCH] drm/amd/powerplay: remove unnecessary call to memset

2017-09-11 Thread Himanshu Jha
, e2); Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com> --- .../drm/amd/powerplay/hwmgr/process_pptables_v1_0.c | 20 1 file changed, 20 deletions(-) diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/process_pptables_v1_0.c b/drivers/gpu/drm/amd/powerplay

[PATCH] scsi: qla2xxx: remove unnecessary call to memset

2017-09-11 Thread Himanshu Jha
, e2); Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com> --- drivers/scsi/qla2xxx/qla_init.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index b5b48dd..54c1d63 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/d

[PATCH] qed: remove unnecessary call to memset

2017-09-12 Thread Himanshu Jha
, e2); Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com> --- drivers/net/ethernet/qlogic/qed/qed_dcbx.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/ethernet/qlogic/qed/qed_dcbx.c b/drivers/net/ethernet/qlogic/qed/qed_dcbx.c index eaca457..8f6ccc0 100644 --- a/drive

[PATCH] IB/qib: Use setup_timer and mod_timer

2017-09-24 Thread Himanshu Jha
-off-by: Himanshu Jha <himanshujha199...@gmail.com> --- drivers/infiniband/hw/qib/qib_driver.c | 8 +++- drivers/infiniband/hw/qib/qib_mad.c| 10 -- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/drivers/infiniband/hw/qib/qib_driver.c b/drivers/infiniband/

[PATCH] net: bcm63xx_enet: Use setup_timer and mod_timer

2017-09-24 Thread Himanshu Jha
-off-by: Himanshu Jha <himanshujha199...@gmail.com> --- drivers/net/ethernet/broadcom/bcm63xx_enet.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/broadcom/bcm63xx_enet.c b/drivers/net/ethernet/broadcom/bcm63xx_enet.c index f8f..c6221f0

[PATCH] video: fbdev: pxa3xx_gcu: Use setup_timer and mod_timer

2017-09-28 Thread Himanshu Jha
-off-by: Himanshu Jha <himanshujha199...@gmail.com> --- drivers/video/fbdev/pxa3xx-gcu.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/video/fbdev/pxa3xx-gcu.c b/drivers/video/fbdev/pxa3xx-gcu.c index 933619d..3366076 100644 --- a/drivers/video/fbdev/

[PATCH] scsi: esas2r: Use setup_timer and mod_timer

2017-09-28 Thread Himanshu Jha
-off-by: Himanshu Jha <himanshujha199...@gmail.com> --- drivers/scsi/esas2r/esas2r_main.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/scsi/esas2r/esas2r_main.c b/drivers/scsi/esas2r/esas2r_main.c index 81f226b..1866ba0 100644 --- a/drivers/scsi/

[PATCH] auxdisplay: img-ascii-lcd: Use setup_timer API

2017-10-01 Thread Himanshu Jha
Use setup_timer API instead of structure assignment. Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com> --- drivers/auxdisplay/img-ascii-lcd.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/auxdisplay/img-ascii-lcd.c b/drivers/auxdisplay/img-ascii

[PATCH] s390/sclp: Use setup_timer and mod_timer

2017-09-24 Thread Himanshu Jha
-off-by: Himanshu Jha <himanshujha199...@gmail.com> --- drivers/s390/char/sclp_con.c | 7 ++- drivers/s390/char/sclp_tty.c | 7 ++- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/drivers/s390/char/sclp_con.c b/drivers/s390/char/sclp_con.c index 6037bc8..9b5ac8f

[PATCH v2] fbdev: vgastate: fix line over 80 character and remove unnecessary space

2017-08-23 Thread Himanshu Jha
Fixes the following checkpatch warnings: WARNING: line over 80 characters WARNING: space prohibited between function name and open parenthesis '(' WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com> --- d

[PATCH] IB/core: replace memcpy with ether_addr_copy

2017-08-24 Thread Himanshu Jha
Use ether_addr_copy to copy an ethernet address of size ETH_ALEN instead of memcpy. Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com> --- drivers/infiniband/core/addr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/infiniband/core/addr.c b/d

Re: [PATCH] IB/core: replace memcpy with ether_addr_copy

2017-08-24 Thread Himanshu Jha
On Thu, Aug 24, 2017 at 09:06:32AM -0700, Joe Perches wrote: > On Thu, 2017-08-24 at 21:11 +0530, Himanshu Jha wrote: > > Use ether_addr_copy to copy an ethernet address of size ETH_ALEN > > instead of memcpy. > [] > diff --git a/drivers/infiniband/core/addr.c b/drivers/i

[PATCH] cfg80211: Use tabs for identation

2017-08-24 Thread Himanshu Jha
Removed whitespaces and added necessary tabs conforming to coding style. Issue found using checkpatch.pl Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com> --- net/wireless/chan.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net/wireless/chan.c b/net/wi

[PATCH] ata: add a blank line after declaration

2017-08-24 Thread Himanshu Jha
Added a blank line after declaration conforming to the coding style. Issue found using checkpatch.pl Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com> --- drivers/ata/acard-ahci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/ata/acard-ahci.c b/drivers/ata/acard-

[PATCH] USB: serial: ti_usb_3410_5052: remove unnecessary brace

2017-08-24 Thread Himanshu Jha
Braces are not required for single statement blocks. Issue found using checkpatch.pl Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com> --- drivers/usb/serial/ti_usb_3410_5052.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/usb/serial/ti_usb_3410_505

[PATCH] drivers: net: wireless: atmel: check memory allocation failure

2017-08-22 Thread Himanshu Jha
Check memory allocation failure and return -ENOMEM if failure occurs. Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com> --- drivers/net/wireless/atmel/at76c50x-usb.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/net/wireless/atmel/at

Re: [PATCH] drivers: net: wireless: atmel: check memory allocation failure

2017-08-22 Thread Himanshu Jha
On Tue, Aug 22, 2017 at 10:41:45AM +0200, Matteo Croce wrote: > Il giorno mar, 22/08/2017 alle 13.41 +0530, Himanshu Jha ha scritto: > > Check memory allocation failure and return -ENOMEM if failure > > occurs. > > > > Signed-off-by: Himanshu Jha <himanshujha199...@g

[PATCH] drivers: tty: Fix improper spaces and braces

2017-08-21 Thread Himanshu Jha
Fixes improper spacing by adding/subtracting necessary spaces around expression and keywords, and removing unnecessary braces. Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com> --- drivers/tty/amiserial.c | 107 +++- 1 file chang

[PATCH] drivers: tty: Fix improper code identation

2017-08-21 Thread Himanshu Jha
Fixes improper code identation error by adding necessary tabs. Issue found using checkpatch. Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com> --- drivers/tty/amiserial.c | 92 +++-- 1 file changed, 44 insertions(+), 48 deletions(-) diff

[PATCH] drivers: video: Fix 80 character limit and remove unnecessary space

2017-08-21 Thread Himanshu Jha
Fixes the following checkpatch warnings: WARNING: line over 80 characters WARNING: space prohibited between function name and open parenthesis '(' WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com> --- d

[PATCH] net: ethernet: broadcom: Remove null check before kfree

2017-08-26 Thread Himanshu Jha
Kfree on NULL pointer is a no-op and therefore checking is redundant. Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com> --- drivers/net/ethernet/broadcom/sb1250-mac.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/net/ethernet/broadcom/

[PATCH 1/2] crypto: n2 - remove null check before kfree

2017-08-26 Thread Himanshu Jha
kfree on NULL pointer is a no-op and therefore checking it is redundant. Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com> --- drivers/crypto/n2_core.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/crypto/n2_core.c b/drivers/crypto/n2_

[PATCH 2/2] crypto: inside-secure - remove null check before kfree

2017-08-26 Thread Himanshu Jha
Kfree on NULL pointer is a no-op and therefore checking is redundant. Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com> --- drivers/crypto/inside-secure/safexcel_hash.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/inside-secure/safexcel_

[PATCH 0/2] remove NULL check before kfree

2017-08-26 Thread Himanshu Jha
*** BLURB HERE *** Himanshu Jha (2): crypto: n2 - remove null check before kfree crypto: inside-secure - remove null check before kfree drivers/crypto/inside-secure/safexcel_hash.c | 6 ++ drivers/crypto/n2_core.c | 12 2 files changed, 6 insertions

[PATCH] [media] atomisp2: Remove null check before kfree

2017-08-26 Thread Himanshu Jha
Kfree on NULL pointer is a no-op and therefore checking is redundant. Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com> --- .../staging/media/atomisp/pci/atomisp2/css2400/sh_css_firmware.c| 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/staging

[PATCH] virtio_mmio: Use PTR_ERROR_OR_ZERO

2017-08-27 Thread Himanshu Jha
Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com> --- drivers/virtio/virtio_mmio.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c index 7

[PATCH] nubus: remove cast to void pointer

2017-08-27 Thread Himanshu Jha
Casting void pointers to other pointer types in unnecessary. Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com> --- drivers/nubus/nubus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/nubus/nubus.c b/drivers/nubus/nubus.c index df431e8..5450f1a

[PATCH] crypto: Use PTR_ERR_ZERO

2017-08-27 Thread Himanshu Jha
Use PTR_ERROR_ZERO rather than if(IS_ERR(...)) + PTR_ERR. Build successfully. Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com> --- drivers/crypto/marvell/tdma.c | 5 + drivers/crypto/mv_cesa.c| 5 + drivers/crypto/qce/ablkcipher.c | 5 + 3 files chan

[PATCH] tty: serial: 8250_mtk: Use PTR_ERR_OR_ZERO

2017-08-27 Thread Himanshu Jha
Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com> --- drivers/tty/serial/8250/8250_mtk.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/tty/serial/8250/8250_mtk.c b/drivers/tty/seria

[PATCH] staging: rtl8723bs: remove memset before memcpy

2017-08-27 Thread Himanshu Jha
calling memcpy immediately after memset with the same region of memory makes memset redundant. Build successfully. Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com> --- drivers/staging/rtl8723bs/core/rtw_ioctl_set.c | 1 - drivers/staging/rtl8723bs/core/rtw_mlme.c | 2 -- d

[PATCH] staging: r8822be: remove unnecessary call to memset

2017-08-27 Thread Himanshu Jha
call to memset to assign 0 value immediately after allocating memory with kzalloc is unnecesaary as kzalloc allocates the memory filled with 0 value. Build and tested it. Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com> --- drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_api_

Re: [PATCH] staging: rtl8723bs: remove memset before memcpy

2017-08-28 Thread Himanshu Jha
On Mon, Aug 28, 2017 at 09:19:06AM +0300, Dan Carpenter wrote: > On Mon, Aug 28, 2017 at 01:43:31AM +0530, Himanshu Jha wrote: > > calling memcpy immediately after memset with the same region of memory > > makes memset redundant. > > > > Build successfully. >

[PATCH] staging: rtlwifi: remove memset before memcpy

2017-08-28 Thread Himanshu Jha
calling memcpy immediately after memset with the same region of memory makes memset redundant. Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com> --- drivers/staging/rtlwifi/base.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/rtlwifi/base.c b/drivers/staging/r

[PATCH] staging: rtl8188eu: remove unnecessary call to memset

2017-08-28 Thread Himanshu Jha
call to memset to assign 0 value immediately after allocating memory with kzalloc is unnecesaary as kzalloc allocates the memory filled with 0 value. Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com> --- drivers/staging/rtl8188eu/core/rtw_mlme.c | 3 --- drivers/staging/rtl

[PATCH] staging: rtl8723bs: hal: remove cast to void pointer

2017-08-28 Thread Himanshu Jha
casting to void pointer from any pointer type and vice-versa is done implicitly and therefore casting is not needed in such a case. Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com> --- drivers/staging/rtl8723bs/hal/hal_btcoex.c| 14 +++ drivers/staging/rtl8723

[PATCH] staging: rtl8723bs: os_dep: remove cast to void pointer

2017-08-28 Thread Himanshu Jha
casting to void pointer from any pointer type and vice-versa is done implicitly and therefore casting is not needed in such a case. Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com> --- drivers/staging/rtl8723bs/os_dep/mlme_linux.c | 4 ++-- drivers/staging/rtl8723bs/

[PATCH] staging: rtl8723bs: core: remove cast to void pointer

2017-08-28 Thread Himanshu Jha
casting to void pointer from any pointer type and vice-versa is done implicitly and therefore casting is not needed in such a case. Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com> --- drivers/staging/rtl8723bs/core/rtw_cmd.c | 2 +- drivers/staging/rtl8723bs/core/rtw_mlme

Re: [PATCH] drivers: tty: Fix improper spaces and braces

2017-08-28 Thread Himanshu Jha
On Mon, Aug 28, 2017 at 04:14:08PM +0200, Greg KH wrote: > On Mon, Aug 21, 2017 at 06:24:41PM +0530, Himanshu Jha wrote: > > Fixes improper spacing by adding/subtracting necessary spaces > > around expression and keywords, and removing unnecessary braces. > > > >

[PATCH] RDMA/bnxt_re: remove unnecessary call to memset

2017-08-25 Thread Himanshu Jha
call to memset to assign 0 value immediately after allocating memory with kzalloc is unnecesaary as kzalloc allocates the memory filled with 0 value. Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com> --- drivers/infiniband/hw/bnxt_re/ib_verbs.c | 2 -- 1 file changed, 2 del

[PATCH] ath9k: remove cast to void pointer

2017-08-31 Thread Himanshu Jha
casting to void pointer from any pointer type and vice-versa is done implicitly and therefore casting is not needed in such a case. Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com> --- drivers/net/wireless/ath/ath9k/ar9003_mac.c | 4 ++-- drivers/net/wireless/ath/ath9k

[PATCH] ALSA: ctxfi: Remove null check before kfree

2017-08-31 Thread Himanshu Jha
kfree on NULL pointer is a no-op and therefore checking is redundant. Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com> --- sound/pci/ctxfi/ctresource.c | 6 ++ sound/pci/ctxfi/ctsrc.c | 6 ++ 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/sound/pci

[PATCH] drm/gma500: Remove null check before kfree

2017-08-30 Thread Himanshu Jha
kfree on NULL pointer is a no-op and therefore checking is redundant. Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com> --- drivers/gpu/drm/gma500/cdv_intel_dp.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/gma500/cdv_intel_dp.c b/drive

[PATCH] drm/i915/opregion: Remove null check before kfree

2017-08-30 Thread Himanshu Jha
kfree on NULL pointer is a no-op and therefore checking is redundant. Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com> --- drivers/gpu/drm/i915/intel_opregion.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_opregion.c b/drive

[PATCH] drm/amd/powerplay/hwmgr: Remove null check before kfree

2017-08-29 Thread Himanshu Jha
kfree on NULL pointer is a no-op and therefore checking is redundant. Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com> --- drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 6 +- .../gpu/drm/amd/powerplay/hwmgr/processpptables.c | 96 -- drivers/gpu/d

[PATCH] PCI: tegra: Use PTR_ERR_OR_ZERO

2017-08-29 Thread Himanshu Jha
Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com> --- drivers/pci/host/pci-tegra.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/pci/host/pci-tegra.c b/drivers/pci/host/pci-tegra.c index 9

[PATCH] rtc: Use PTR_ERR_OR_ZERO

2017-08-29 Thread Himanshu Jha
Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com> --- drivers/rtc/rtc-digicolor.c | 5 + drivers/rtc/rtc-ds1347.c| 5 + 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/rtc/rtc-digicol

[PATCH] scsi: qla2xxx: Use PTR_ERR_OR_ZERO

2017-08-29 Thread Himanshu Jha
Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com> --- drivers/scsi/qla2xxx/tcm_qla2xxx.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/scsi/qla2xxx/tcm_qla2xxx.c b/drivers/scsi/q

[PATCH] drm: omapdrm: hdmi: Use PTR_ERR_OR_ZERO

2017-08-29 Thread Himanshu Jha
Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com> --- drivers/gpu/drm/omapdrm/dss/hdmi4.c | 5 + drivers/gpu/drm/omapdrm/dss/hdmi4_core.c | 5 + drivers/gpu/drm/omapdrm/dss/hdmi5_core.c | 5 + drivers/g

Re: [PATCH] PCI: tegra: Use PTR_ERR_OR_ZERO

2017-08-29 Thread Himanshu Jha
On Tue, Aug 29, 2017 at 03:55:17PM +0200, Thierry Reding wrote: > On Tue, Aug 29, 2017 at 07:09:00PM +0530, Himanshu Jha wrote: > > Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR > > > > Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com> > > ---

[PATCH] PCI: dwc: Use PTR_ERR_OR_ZERO

2017-08-29 Thread Himanshu Jha
Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com> --- drivers/pci/dwc/pci-exynos.c | 5 + drivers/pci/dwc/pcie-kirin.c | 10 ++ drivers/pci/dwc/pcie-qcom.c | 5 + 3 files changed, 4 insertions(+), 16 del

[PATCH] drm/sun4i: Use PTR_ERR_OR_ZERO

2017-08-29 Thread Himanshu Jha
Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com> --- drivers/gpu/drm/sun4i/sun4i_dotclock.c | 5 + drivers/gpu/drm/sun4i/sun4i_hdmi_ddc_clk.c | 5 + drivers/gpu/drm/sun4i/sun4i_hdmi_tmds_clk.c | 5 + 3

[PATCH] drm/amd: Remove null check before kfree

2017-08-29 Thread Himanshu Jha
Kfree on NULL pointer is a no-op and therefore checking is redundant. Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c | 6 ++ drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c | 6 ++ 2 files changed, 4 insertions

[PATCH] remoteproc: qcom: Use PTR_ERR_OR_ZERO

2017-08-29 Thread Himanshu Jha
Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com> --- drivers/remoteproc/qcom_adsp_pil.c | 5 + drivers/remoteproc/qcom_common.c | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/remo

Re: [PATCH] rtc: remove cast to void pointer

2017-09-03 Thread Himanshu Jha
On Tue, Aug 29, 2017 at 08:09:03PM +0530, Himanshu Jha wrote: > casting to void pointer from any pointer type and vice-versa is done > implicitly and therefore casting is not needed in such a case. > I hope my patch is in your queue, got no reply till now. Thanks > Signed-off-by:

[PATCH v2] ath9k: remove cast to void pointer

2017-09-01 Thread Himanshu Jha
e ) Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com> --- drivers/net/wireless/ath/ath9k/ar9003_mac.c | 4 ++-- drivers/net/wireless/ath/ath9k/dfs.c| 2 +- drivers/net/wireless/ath/ath9k/hif_usb.c| 8 drivers/net/wireless/ath/ath9k/htc_drv_beac

[PATCH] rtc: remove cast to void pointer

2017-08-29 Thread Himanshu Jha
casting to void pointer from any pointer type and vice-versa is done implicitly and therefore casting is not needed in such a case. Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com> --- drivers/rtc/interface.c | 4 ++-- drivers/rtc/rtc-88pm80x.c| 2 +- drivers/rtc/rtc-88pm

Re: [PATCH] rtc: Use PTR_ERR_OR_ZERO

2017-08-29 Thread Himanshu Jha
On Tue, Aug 29, 2017 at 04:20:11PM +0200, Alexandre Belloni wrote: > Hi, > > On 29/08/2017 at 19:16:59 +0530, Himanshu Jha wrote: > > Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR > > > > I'm not taking that kind of useless changes (especially since it ma

[PATCH] mwifiex: Use put_unaligned_le32

2017-10-04 Thread Himanshu Jha
hen != tmp - memcpy(ptr, (T), ...); + put_unaligned_le32(x,ptr); ...+> @ depends on rule1 @ type j; identifier tmp; @@ - j tmp; ...when != tmp Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com> --- drivers/net/wireless/marvell/mwifiex/cmdevt.c | 10 -- 1 file changed,

[PATCH] usb: wusbcore: Use put_unaligned_le32

2017-10-04 Thread Himanshu Jha
hen != tmp - memcpy(ptr, (T), ...); + put_unaligned_le32(x,ptr); ...+> @ depends on rule1 @ type j; identifier tmp; @@ - j tmp; ...when != tmp Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com> --- drivers/usb/wusbcore/security.c | 9 - 1 file changed, 4 insertions(+),

[PATCH v2] scsi: be2iscsi: Use kasprintf

2017-10-11 Thread Himanshu Jha
Use kasprintf instead of combination of kmalloc and sprintf. Also, remove BEISCSI_MSI_NAME macro used to specify size of string as kasprintf handles size computations. Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com> --- v2: -remove the unnecessary macro BEISCSI_MSI_NAME. d

[PATCH] Coccinelle: Add scripts/coccinelle/alloc/vzalloc-simple.cocci

2017-11-10 Thread Himanshu Jha
Use vzalloc rather than vmalloc followed by memset with region of memory filled with 0 value. It considers only simple cases. 0-day tested without any issues. Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com> --- scripts/coccinelle/api/alloc/vzalloc-simple.cocc

Re: [PATCH v3] bcma:Adjust block comments

2017-11-28 Thread Himanshu Jha
wirless as I don't want my primary email to be flooded with frequent emails, and my upstream mail is himanshujha199...@gmail.com ! Thanks Himanshu Jha

Re: [PATCH v2] scsi: be2iscsi: Use kasprintf

2017-11-03 Thread Himanshu Jha
On Wed, Oct 11, 2017 at 09:06:14PM +0530, Himanshu Jha wrote: Hi James, Just a reminder, is my patch in our queue ? Thanks Himanshu Jha > Use kasprintf instead of combination of kmalloc and sprintf. > Also, remove BEISCSI_MSI_NAME macro used to specify size of string as > kasprint

Re: [PATCH v2] scsi: be2iscsi: Use kasprintf

2017-11-03 Thread Himanshu Jha
On Fri, Nov 03, 2017 at 11:25:05AM -0400, Martin K. Petersen wrote: Hi Martin, > > Himanshu, > > > Just a reminder, is my patch in our queue ? > > It is not. It needs a review/ack from the driver maintainers. What about Kyle Fortin's review ? > -- > Martin K. PetersenOracle Linux

Re: [PATCH] freezer: Fix typo in commnent to function freezable_schedule_timeout()

2017-11-06 Thread Himanshu Jha
On Sat, Nov 04, 2017 at 11:02:56PM +0100, Pavel Machek wrote: > On Sun 2017-11-05 03:27:32, Himanshu Jha wrote: > > Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com> > > ACK. > > But note you have typo in the subject ;-). Oops! Do I need to send v2 wit

Re: [PATCH] scsi: Use vzalloc instead of vmalloc/memset

2017-11-07 Thread Himanshu Jha
On Tue, Nov 07, 2017 at 08:51:36PM +0100, Luis R. Rodriguez wrote: > On Sun, Nov 05, 2017 at 03:26:26AM +0530, Himanshu Jha wrote: > > Use vzalloc instead of vmalloc/memset to allocate memory filled with 0 > > value. > > > > Done using Coccinel

[PATCH] [media] pulse8-cec: Eliminate use of time_t and time_to_tm

2017-11-04 Thread Himanshu Jha
Eliminate the use of time_t type and time_to_tm functions as they are deprecated due to y2038 problem. Use the 64-Bit type interface instead. Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com> --- drivers/media/usb/pulse8-cec/pulse8-cec.c | 4 ++-- 1 file changed, 2 insertions

[PATCH] firmware: raspberrypi: Eliminate use of time_to_tm

2017-11-04 Thread Himanshu Jha
time_to_tm function is deprecated due to y2038 problem, therefore use time64_to_tm instead. Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com> --- drivers/firmware/raspberrypi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/firmware/raspberry

[PATCH] scsi: Use vzalloc instead of vmalloc/memset

2017-11-04 Thread Himanshu Jha
Use vzalloc instead of vmalloc/memset to allocate memory filled with 0 value. Done using Coccinelle. Semantic patch used : @@ expression x,a; statement S; @@ - x = vmalloc(a); + x = vzalloc(a); if (x == NULL || ...) S - memset(x, 0, a); Signed-off-by: Himanshu Jha <himanshujha

[PATCH] freezer: Fix typo in commnent to function freezable_schedule_timeout()

2017-11-04 Thread Himanshu Jha
Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com> --- include/linux/freezer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/freezer.h b/include/linux/freezer.h index 3995df1..21f5aa0 100644 --- a/include/linux/freezer.h +++ b/include/linux/fre

[PATCH] scsi: Remove null check before kfree

2017-11-06 Thread Himanshu Jha
Kfree on NULL pointer is a no-op and therefore checking is redundant. Done using Coccinelle. Semantic patch used : @@ expression E; @@ - if (E != NULL) { kfree(E); } + kfree(E); @@ expression E; @@ - if (E != NULL) { kfree(E); E = NULL; } + kfree(E); + E = NULL; Signed-off-by: Himanshu Jha

Re: [PATCH v3] usb: wusbcore: Use put_unaligned_le32

2017-10-31 Thread Himanshu Jha
On Tue, Oct 17, 2017 at 05:14:30PM +0530, Himanshu Jha wrote: Hi Greg, > Use put_unaligned_le32 rather than using byte ordering function and > memcpy which makes code clear. > Also, add the header file where it is declared. > I hope my patch is in your queue! > Done u

Re: [PATCH] USB: host: Use zeroing memory allocator rather than allocator/memset

2017-12-30 Thread Himanshu Jha
On Sat, Dec 30, 2017 at 11:41:19AM -0500, Alan Stern wrote: > On Sat, 30 Dec 2017, Himanshu Jha wrote: > > > Use dma_zalloc_coherent for allocating zeroed > > memory and remove unnecessary memset function. > > > > Done using Coccinelle. > > Generated-by:

[PATCH] qed: Use zeroing memory allocator than allocator/memset

2017-12-30 Thread Himanshu Jha
ed-off-by: Himanshu Jha <himanshujha199...@gmail.com> --- drivers/net/ethernet/qlogic/qed/qed_cxt.c | 12 +--- drivers/net/ethernet/qlogic/qed/qed_l2.c | 3 +-- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/drivers/net/ethernet/qlogic/qed/qed_cxt.c b/drivers/net/etherne

[PATCH] IB/ocrdma: Use zeroing memory allocator than allocator/memset

2017-12-30 Thread Himanshu Jha
Use dma_zalloc_coherent for allocating zeroed memory and remove unnecessary memset function. Done using Coccinelle. Generated-by: scripts/coccinelle/api/alloc/kzalloc-simple.cocci 0-day tested with no failures. Suggested-by: Luis R. Rodriguez <mcg...@kernel.org> Signed-off-by: Himans

[PATCH] USB: host: Use zeroing memory allocator rather than allocator/memset

2017-12-30 Thread Himanshu Jha
Use dma_zalloc_coherent for allocating zeroed memory and remove unnecessary memset function. Done using Coccinelle. Generated-by: scripts/coccinelle/api/alloc/kzalloc-simple.cocci 0-day tested with no failures. Suggested-by: Luis R. Rodriguez <mcg...@kernel.org> Signed-off-by: Himans

[PATCH] ethernet/broadcom: Use zeroing memory allocator than allocator/memset

2017-12-30 Thread Himanshu Jha
Use dma_zalloc_coherent for allocating zeroed memory and remove unnecessary memset function. Done using Coccinelle. Generated-by: scripts/coccinelle/api/alloc/kzalloc-simple.cocci 0-day tested with no failures. Suggested-by: Luis R. Rodriguez <mcg...@kernel.org> Signed-off-by: Himans

[PATCH] scsi: megaraid: Use zeroing memory allocator than allocator/memset

2017-12-30 Thread Himanshu Jha
Use pci_zalloc_consistent for allocating zeroed memory and remove unnecessary memset function. Done using Coccinelle. Generated-by: scripts/coccinelle/api/alloc/kzalloc-simple.cocci 0-day tested with no failures. Suggested-by: Luis R. Rodriguez <mcg...@kernel.org> Signed-off-by: Himans

[PATCH] brcmfmac: Use zeroing memory allocator than allocator/memset

2017-12-30 Thread Himanshu Jha
Use dma_zalloc_coherent for allocating zeroed memory and remove unnecessary memset function. Done using Coccinelle. Generated-by: scripts/coccinelle/api/alloc/kzalloc-simple.cocci 0-day tested with no failures. Suggested-by: Luis R. Rodriguez <mcg...@kernel.org> Signed-off-by: Himans

[PATCH] scsi: fnic: Use eth_broadcast_addr instead of memset

2017-12-30 Thread Himanshu Jha
Use eth_broadcasr_addr Networking API instead of memset to assign the broadcast address to the given address array. 0-day tested with no failures. Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com> --- drivers/scsi/fnic/fnic_scsi.c | 2 +- 1 file changed, 1 insertion(+), 1 de

[PATCH] [media] pulse8-cec: Eliminate use of time_t and time_to_tm

2017-12-30 Thread Himanshu Jha
! Signed-off-by: Himanshu Jha <himanshujha199...@gmail.com> --- drivers/media/usb/pulse8-cec/pulse8-cec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/usb/pulse8-cec/pulse8-cec.c b/drivers/media/usb/pulse8-cec/pulse8-cec.c index 50146f2..3506358

  1   2   3   >