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
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
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
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
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
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
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:
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
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:
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
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
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.
>
> >
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
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
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
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
16 matches
Mail list logo