From: zhong jiang <zhongjiang@huawei.com>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [PATCH] ethernet: Use dma_zalloc_coherent to replace dma_alloc_coherent + memset
Date: Mon, 20 Aug 2018 09:35:03 +0800 [thread overview]
Message-ID: <5B7A1AC7.10301@huawei.com> (raw)
In-Reply-To: <8E050A97-6745-4CC9-A3CD-B30DC7A34DEF@intel.com>
On 2018/8/19 8:22, Kirsher, Jeffrey T wrote:
> Please send ALL patches against drivers I maintain to the Intel-wired-lan at lists.osuosl.org. Your repeated refusal to do so, makes me think you are trying to circumvent the maintainer (me) and the correct kernel patch process.
I am sorry to that. :-[ It is my fault that I never want to circumvent the maintainer. I will notice that for next time. Thank you for your understanding.
Best wishes,
zhong jiang
> Sent from my iPhone
>
>> On Aug 18, 2018, at 08:00, zhong jiang <zhongjiang@huawei.com> wrote:
>>
>> dma_zalloc_coherent has implemented the dma_alloc_coherent() + memset (),
>> We prefer to dma_zalloc_coherent instead of open-codeing.
>>
>> Signed-off-by: zhong jiang <zhongjiang@huawei.com>
>> ---
>> drivers/net/ethernet/intel/ixgb/ixgb_main.c | 5 ++---
>> 1 file changed, 2 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/net/ethernet/intel/ixgb/ixgb_main.c b/drivers/net/ethernet/intel/ixgb/ixgb_main.c
>> index 43664ad..d3e72d0 100644
>> --- a/drivers/net/ethernet/intel/ixgb/ixgb_main.c
>> +++ b/drivers/net/ethernet/intel/ixgb/ixgb_main.c
>> @@ -771,14 +771,13 @@ static pci_ers_result_t ixgb_io_error_detected (struct pci_dev *pdev,
>> rxdr->size = rxdr->count * sizeof(struct ixgb_rx_desc);
>> rxdr->size = ALIGN(rxdr->size, 4096);
>>
>> - rxdr->desc = dma_alloc_coherent(&pdev->dev, rxdr->size, &rxdr->dma,
>> - GFP_KERNEL);
>> + rxdr->desc = dma_zalloc_coherent(&pdev->dev, rxdr->size, &rxdr->dma,
>> + GFP_KERNEL);
>>
>> if (!rxdr->desc) {
>> vfree(rxdr->buffer_info);
>> return -ENOMEM;
>> }
>> - memset(rxdr->desc, 0, rxdr->size);
>>
>> rxdr->next_to_clean = 0;
>> rxdr->next_to_use = 0;
>> --
>> 1.7.12.4
>>
> .
>
prev parent reply other threads:[~2018-08-20 1:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-18 14:48 [PATCH] ethernet: Use dma_zalloc_coherent to replace dma_alloc_coherent + memset zhong jiang
2018-08-19 0:22 ` [Intel-wired-lan] " Kirsher, Jeffrey T
2018-08-20 1:35 ` zhong jiang [this message]
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=5B7A1AC7.10301@huawei.com \
--to=zhongjiang@huawei.com \
--cc=intel-wired-lan@osuosl.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.