From: YueHaibing <yuehaibing@huawei.com>
To: <davem@davemloft.net>
Cc: <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<jcliburn@gmail.com>, <chris.snook@gmail.com>, <benve@cisco.com>,
<jdmason@kudzu.us>, <chessman@tux.org>, <jes@trained-monkey.org>,
<rahul.verma@cavium.com>, YueHaibing <yuehaibing@huawei.com>
Subject: [PATCH net-next 6/6] enic: use pci_zalloc_consistent
Date: Tue, 5 Jun 2018 20:28:51 +0800 [thread overview]
Message-ID: <20180605122851.23912-7-yuehaibing@huawei.com> (raw)
In-Reply-To: <20180605122851.23912-1-yuehaibing@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.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
next prev parent reply other threads:[~2018-06-05 12:32 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-05 12:28 [PATCH net-next 0/6] " YueHaibing
2018-06-05 12:28 ` [PATCH net-next 1/6] net: hippi: " YueHaibing
2018-06-06 9:53 ` Sergei Shtylyov
2018-06-06 15:04 ` kbuild test robot
2018-06-05 12:28 ` [PATCH net-next 2/6] net: atheros: " YueHaibing
2018-06-05 12:28 ` [PATCH net-next 3/6] net: neterion: " YueHaibing
2018-06-05 12:28 ` [PATCH net-next 4/6] netxen_nic: " YueHaibing
2018-06-06 9:56 ` Sergei Shtylyov
2018-06-05 12:28 ` [PATCH net-next 5/6] net: tlan: " YueHaibing
2018-06-05 12:28 ` YueHaibing [this message]
2018-06-05 12:39 ` [PATCH net-next 0/6] " Andy Shevchenko
2018-06-05 12:49 ` Christoph Hellwig
2018-06-05 12:46 ` Andy Shevchenko
2018-06-05 13:04 ` YueHaibing
2018-06-05 13:00 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180605122851.23912-7-yuehaibing@huawei.com \
--to=yuehaibing@huawei.com \
--cc=benve@cisco.com \
--cc=chessman@tux.org \
--cc=chris.snook@gmail.com \
--cc=davem@davemloft.net \
--cc=jcliburn@gmail.com \
--cc=jdmason@kudzu.us \
--cc=jes@trained-monkey.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=rahul.verma@cavium.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®