From: zhong jiang <zhongjiang@huawei.com>
To: Bing Bu Cao <bingbu.cao@linux.intel.com>
Cc: <yong.zhi@intel.com>, <sakari.ailus@linux.intel.com>,
<bingbu.cao@intel.com>, <mchehab@kernel.org>,
<matthias.bgg@gmail.com>, <tian.shu.qiu@intel.com>,
<jian.xu.zheng@intel.com>, <linux-kernel@vger.kernel.org>,
<linux-media@vger.kernel.org>
Subject: Re: [PATCH 1/2] media: ipu3-cio2: Use dma_zalloc_coherent to replace dma_alloc_coherent + memset
Date: Fri, 24 Aug 2018 11:36:41 +0800 [thread overview]
Message-ID: <5B7F7D49.10206@huawei.com> (raw)
In-Reply-To: <541b8c22-018f-4df6-85d1-82a72d9ab669@linux.intel.com>
On 2018/8/24 10:58, Bing Bu Cao wrote:
> Hi, Jiang
>
> This looks fine for me in ipu3-cio2.
> Actually, we already have this change locally, but I think we miss submit it to community.
> Thanks!
It's ok, Anyway, Thank you for let me know that.
Best wishes,
zhong jiang
> On 08/18/2018 11:16 PM, zhong jiang 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/media/pci/intel/ipu3/ipu3-cio2.c | 6 ++----
>> 1 file changed, 2 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/media/pci/intel/ipu3/ipu3-cio2.c b/drivers/media/pci/intel/ipu3/ipu3-cio2.c
>> index 2902715..f0c6374 100644
>> --- a/drivers/media/pci/intel/ipu3/ipu3-cio2.c
>> +++ b/drivers/media/pci/intel/ipu3/ipu3-cio2.c
>> @@ -218,13 +218,11 @@ static int cio2_fbpt_init(struct cio2_device *cio2, struct cio2_queue *q)
>> {
>> struct device *dev = &cio2->pci_dev->dev;
>>
>> - q->fbpt = dma_alloc_coherent(dev, CIO2_FBPT_SIZE, &q->fbpt_bus_addr,
>> - GFP_KERNEL);
>> + q->fbpt = dma_zalloc_coherent(dev, CIO2_FBPT_SIZE, &q->fbpt_bus_addr,
>> + GFP_KERNEL);
>> if (!q->fbpt)
>> return -ENOMEM;
>>
>> - memset(q->fbpt, 0, CIO2_FBPT_SIZE);
>> -
>> return 0;
>> }
>>
>
> .
>
next prev parent reply other threads:[~2018-08-24 7:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-18 15:16 [PATCH 0/2] media: Use dma_zalloc_coherent to replace dma_alloc_coherent + memset zhong jiang
2018-08-18 15:16 ` [PATCH 1/2] media: ipu3-cio2: " zhong jiang
2018-08-24 2:58 ` Bing Bu Cao
2018-08-24 3:36 ` zhong jiang [this message]
2018-08-18 15:16 ` [PATCH 2/2] media: mtk_vcodec_util: " zhong jiang
2018-08-23 11:23 ` [PATCH 0/2] media: " zhong jiang
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=5B7F7D49.10206@huawei.com \
--to=zhongjiang@huawei.com \
--cc=bingbu.cao@intel.com \
--cc=bingbu.cao@linux.intel.com \
--cc=jian.xu.zheng@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=matthias.bgg@gmail.com \
--cc=mchehab@kernel.org \
--cc=sakari.ailus@linux.intel.com \
--cc=tian.shu.qiu@intel.com \
--cc=yong.zhi@intel.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 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.