[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20170915.140219.188567213297726189.davem@davemloft.net>
Date: Fri, 15 Sep 2017 14:02:19 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: himanshujha199640@...il.com
Cc: Yuval.Mintz@...ium.com, Ariel.Elior@...ium.com,
everest-linux-l2@...ium.com, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] qed: remove unnecessary call to memset
From: Himanshu Jha <himanshujha199640@...il.com>
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 <himanshujha199640@...il.com>
Applied.
Powered by blists - more mailing lists