OSDN Git Service

ethernet/broadcom: Use zeroing memory allocator than allocator/memset
authorHimanshu Jha <himanshujha199640@gmail.com>
Sat, 30 Dec 2017 15:44:57 +0000 (21:14 +0530)
committerDavid S. Miller <davem@davemloft.net>
Wed, 3 Jan 2018 02:56:40 +0000 (21:56 -0500)
commitaa006d1ad0a58f5dad0065b25263a73365319996
tree8ee936b74cd14d0d0b32e067b9377466ff199cf3
parent5f58dff96755b9bfa13be834a2cca9e4778df20d
ethernet/broadcom: Use zeroing memory allocator than allocator/memset

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@kernel.org>
Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bcm63xx_enet.c
drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c