From: Christian Borntraeger <borntraeger@de.ibm.com>
To: Joerg Roedel <jroedel@suse.de>
Cc: linux-s390 <linux-s390@vger.kernel.org>,
KVM <kvm@vger.kernel.org>, Michael Tsirkin <mst@redhat.com>,
benh@kernel.crashing.org,
Sebastian Ott <sebott@linux.vnet.ibm.com>,
virtualization@lists.linux-foundation.org,
Martin Schwidefsky <schwidefsky@de.ibm.com>,
Andy Lutomirski <luto@kernel.org>,
Paolo Bonzini <pbonzini@redhat.com>,
dwmw2@infradead.org, Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH 1/3] Provide simple noop dma ops
Date: Mon, 2 Nov 2015 17:01:47 +0100 [thread overview]
Message-ID: <563788EB.6050405@de.ibm.com> (raw)
In-Reply-To: <20151102151644.GC2876@suse.de>
Am 02.11.2015 um 16:16 schrieb Joerg Roedel:
> On Fri, Oct 30, 2015 at 02:20:35PM +0100, Christian Borntraeger wrote:
>> +static void *dma_noop_alloc(struct device *dev, size_t size,
>> + dma_addr_t *dma_handle, gfp_t gfp,
>> + struct dma_attrs *attrs)
>> +{
>> + void *ret;
>> +
>> + ret = (void *)__get_free_pages(gfp, get_order(size));
>> + if (ret) {
>> + memset(ret, 0, size);
>
> There is no need to zero out the memory here. If the user wants
> initialized memory it can call dma_zalloc_coherent. Having the memset
> here means to clear the memory twice in the dma_zalloc_coherent path.
>
> Otherwise it looks good.
Thanks. Will fix.
In addition I will also make the compilation of dma-noop.o dependent
on HAS_DMA.
next prev parent reply other threads:[~2015-11-02 16:01 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-30 13:20 [PATCHv2 0/3] dma ops and virtio Christian Borntraeger
2015-10-30 13:20 ` [PATCH 1/3] Provide simple noop dma ops Christian Borntraeger
2015-11-02 15:16 ` Joerg Roedel
2015-11-02 16:01 ` Christian Borntraeger [this message]
2015-11-02 15:16 ` Joerg Roedel
2015-10-30 13:20 ` [PATCH 2/3] alpha: use common " Christian Borntraeger
2015-10-30 13:20 ` Christian Borntraeger
2015-11-02 15:18 ` Joerg Roedel
2015-10-30 13:20 ` [PATCH 3/3] s390/dma: Allow per device " Christian Borntraeger
2015-11-02 15:21 ` Joerg Roedel
2015-11-02 16:38 ` Sebastian Ott
2015-10-30 13:20 ` Christian Borntraeger
2015-11-02 15:27 ` [PATCHv2 0/3] dma ops and virtio Sebastian Ott
2015-11-02 15:27 ` Sebastian Ott
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=563788EB.6050405@de.ibm.com \
--to=borntraeger@de.ibm.com \
--cc=benh@kernel.crashing.org \
--cc=dwmw2@infradead.org \
--cc=hch@lst.de \
--cc=jroedel@suse.de \
--cc=kvm@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=schwidefsky@de.ibm.com \
--cc=sebott@linux.vnet.ibm.com \
--cc=virtualization@lists.linux-foundation.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.