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

From: Jason Gunthorpe
Date: Tue Jan 02 2018 - 16:06:08 EST


On Sat, Dec 30, 2017 at 09:09:56PM +0530, Himanshu Jha wrote:
> 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 <mcgrof@xxxxxxxxxx>
> Signed-off-by: Himanshu Jha <himanshujha199640@xxxxxxxxx>
> Reviewed-by: Leon Romanovsky <leonro@xxxxxxxxxxxx>
> Acked-by: Selvin Xavier <selvin.xavier@xxxxxxxxxxxx>
> drivers/infiniband/hw/ocrdma/ocrdma_hw.c | 19 +++++++------------
> drivers/infiniband/hw/ocrdma/ocrdma_stats.c | 6 ++----
> drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 8 +++-----
> 3 files changed, 12 insertions(+), 21 deletions(-)

Applied to for-next thanks

Jason