Thread (3 messages) flat view 3 messages, 3 authors, 2017-09-15

Re: [PATCH] qed: remove unnecessary call to memset

From: David Miller <davem@davemloft.net>
Date: 2017-09-15 21:02:24
Also in: lkml

From: Himanshu Jha <redacted>
Date: Tue, 12 Sep 2017 16:49:22 +0530
call to memset to assign 0 value immediately after allocating
memory with kzalloc is unnecesaary as kzalloc allocates the memory
filled with 0 value.

Semantic patch used to resolve this issue:

@@
expression e,e2; constant c;
statement S;
@@

  e = kzalloc(e2, c);
  if(e == NULL) S
- memset(e, 0, e2);

Signed-off-by: Himanshu Jha <redacted>
Applied.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help