Re: [Cocci] [PATCH v2 08/10] scripts: Coccinelle script for namespace dependencies.

2019-08-13 Thread Himanshu Jha
d, 97 insertions(+), 1 deletion(-) > create mode 100644 scripts/coccinelle/misc/add_namespace.cocci > create mode 100644 scripts/nsdeps [] > +if [ "$SPATCH_VERSION_NUM" -lt "$SPATCH_REQ_VERSION_NUM" ] ; then > +echo 'spatch needs to be version 1.06 or higher

[PATCH v2] usb: isp1760: Use kasprintf

2018-03-07 Thread Himanshu Jha
Use kasprintf instead of combination of kmalloc and sprintf and therefore avoid unnecessary computation of string length. Also, remove the useless local variable. Signed-off-by: Himanshu Jha --- drivers/usb/isp1760/isp1760-udc.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) v2

Re: [PATCH] usb: isp1760: Use kasprintf

2018-03-07 Thread Himanshu Jha
On Wed, Mar 07, 2018 at 08:20:54PM +0200, Andy Shevchenko wrote: > On Wed, Mar 7, 2018 at 8:08 PM, Himanshu Jha > wrote: > > Use kasprintf instead of combination of kmalloc and sprintf and > > therefore avoid unnecessary computation of string length. > > >

[PATCH] usb: isp1760: Use kasprintf

2018-03-07 Thread Himanshu Jha
Use kasprintf instead of combination of kmalloc and sprintf and therefore avoid unnecessary computation of string length. Signed-off-by: Himanshu Jha --- drivers/usb/isp1760/isp1760-udc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/usb/isp1760/isp1760-udc.c b

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

2018-01-01 Thread Himanshu Jha
On Mon, Jan 01, 2018 at 10:53:07AM -0500, Alan Stern wrote: > On Mon, 1 Jan 2018, Himanshu Jha wrote: > > > On Sun, Dec 31, 2017 at 04:20:45PM -0500, Alan Stern wrote: > > > On Sun, 31 Dec 2017, Himanshu Jha wrote: > > > > > > > Use dma_zalloc_coheren

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

2018-01-01 Thread Himanshu Jha
On Sun, Dec 31, 2017 at 04:20:45PM -0500, Alan Stern wrote: > On Sun, 31 Dec 2017, Himanshu Jha wrote: > > > Use dma_zalloc_coherent for allocating zeroed > > memory and remove unnecessary memset function. > > > > Done using Coccinelle. > > Generated-by:

[PATCH v2] 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 Signed-off-by: Himanshu Jha --- v2: -align

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] 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 Signed-off-by: Himanshu Jha --- drivers/usb/host

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 using

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

[PATCH v3] usb: wusbcore: Use put_unaligned_le32

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

[PATCH v2] usb: wusbcore: Use put_unaligned_le32

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

[PATCH] usb: wusbcore: Use put_unaligned_le32

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

[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 --- 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_5052.c b/drivers/usb/serial

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

2017-08-03 Thread Himanshu Jha
ARNING: line over 80 characters Signed-off-by: Himanshu Jha --- 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/serial/ch341