[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180605122851.23912-7-yuehaibing@huawei.com>
Date: Tue, 5 Jun 2018 20:28:51 +0800
From: YueHaibing <yuehaibing@...wei.com>
To: <davem@...emloft.net>
CC: <netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<jcliburn@...il.com>, <chris.snook@...il.com>, <benve@...co.com>,
<jdmason@...zu.us>, <chessman@....org>, <jes@...ined-monkey.org>,
<rahul.verma@...ium.com>, YueHaibing <yuehaibing@...wei.com>
Subject: [PATCH net-next 6/6] enic: use pci_zalloc_consistent
Signed-off-by: YueHaibing <yuehaibing@...wei.com>
---
drivers/net/ethernet/cisco/enic/vnic_dev.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/cisco/enic/vnic_dev.c b/drivers/net/ethernet/cisco/enic/vnic_dev.c
index 76cdd4c..7693af9 100644
--- a/drivers/net/ethernet/cisco/enic/vnic_dev.c
+++ b/drivers/net/ethernet/cisco/enic/vnic_dev.c
@@ -1217,13 +1217,12 @@ int vnic_dev_classifier(struct vnic_dev *vdev, u8 cmd, u16 *entry,
tlv_size = sizeof(struct filter) +
sizeof(struct filter_action) +
2 * sizeof(struct filter_tlv);
- tlv_va = pci_alloc_consistent(vdev->pdev, tlv_size, &tlv_pa);
+ tlv_va = pci_zalloc_consistent(vdev->pdev, tlv_size, &tlv_pa);
if (!tlv_va)
return -ENOMEM;
tlv = tlv_va;
a0 = tlv_pa;
a1 = tlv_size;
- memset(tlv, 0, tlv_size);
tlv->type = CLSF_TLV_FILTER;
tlv->length = sizeof(struct filter);
*(struct filter *)&tlv->val = *data;
--
2.7.0
Powered by blists - more mailing lists