From: Ingo Molnar <mingo@kernel.org>
To: Christoph Hellwig <hch@lst.de>
Cc: sstabellini@kernel.org, konrad.wilk@oracle.com,
boris.ostrovsky@oracle.com, david.vrabel@citrix.com,
jgross@suse.com, x86@kernel.org, linux-kernel@vger.kernel.org,
Thomas Gleixner <tglx@linutronix.de>,
Peter Zijlstra <a.p.zijlstra@chello.nl>
Subject: Re: [PATCH] xen: consolidate swiotbl_xen dma_ops
Date: Mon, 12 Sep 2016 13:45:40 +0200 [thread overview]
Message-ID: <20160912114539.GB7597@gmail.com> (raw)
In-Reply-To: <1473611708-25179-1-git-send-email-hch@lst.de>
* Christoph Hellwig <hch@lst.de> wrote:
> +struct dma_map_ops xen_swiotlb_dma_ops = {
> + .mapping_error = xen_swiotlb_dma_mapping_error,
> + .alloc = xen_swiotlb_alloc_coherent,
> + .free = xen_swiotlb_free_coherent,
> + .sync_single_for_cpu = xen_swiotlb_sync_single_for_cpu,
> + .sync_single_for_device = xen_swiotlb_sync_single_for_device,
> + .sync_sg_for_cpu = xen_swiotlb_sync_sg_for_cpu,
> + .sync_sg_for_device = xen_swiotlb_sync_sg_for_device,
> + .map_sg = xen_swiotlb_map_sg_attrs,
> + .unmap_sg = xen_swiotlb_unmap_sg_attrs,
> + .map_page = xen_swiotlb_map_page,
> + .unmap_page = xen_swiotlb_unmap_page,
> + .dma_supported = xen_swiotlb_dma_supported,
> + .set_dma_mask = xen_swiotlb_set_dma_mask,
> +};
Please organize such initializers better! Something like this:
struct dma_map_ops xen_swiotlb_dma_ops = {
.mapping_error = xen_swiotlb_dma_mapping_error,
.alloc = xen_swiotlb_alloc_coherent,
.free = xen_swiotlb_free_coherent,
.sync_single_for_cpu = xen_swiotlb_sync_single_for_cpu,
.sync_single_for_device = xen_swiotlb_sync_single_for_device,
.sync_sg_for_cpu = xen_swiotlb_sync_sg_for_cpu,
.sync_sg_for_device = xen_swiotlb_sync_sg_for_device,
.map_sg = xen_swiotlb_map_sg_attrs,
.unmap_sg = xen_swiotlb_unmap_sg_attrs,
.map_page = xen_swiotlb_map_page,
.unmap_page = xen_swiotlb_unmap_page,
.dma_supported = xen_swiotlb_dma_supported,
.set_dma_mask = xen_swiotlb_set_dma_mask,
};
Makes it much easier to review such definitions.
Thanks,
Ingo
next prev parent reply other threads:[~2016-09-12 11:45 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-11 16:35 [PATCH] xen: consolidate swiotbl_xen dma_ops Christoph Hellwig
2016-09-12 11:45 ` Ingo Molnar [this message]
2016-09-12 14:51 ` Christoph Hellwig
2016-09-13 18:37 ` Ingo Molnar
2016-09-14 5:35 ` Christoph Hellwig
2016-09-13 13:01 ` Konrad Rzeszutek Wilk
2016-09-13 17:59 ` Stefano Stabellini
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=20160912114539.GB7597@gmail.com \
--to=mingo@kernel.org \
--cc=a.p.zijlstra@chello.nl \
--cc=boris.ostrovsky@oracle.com \
--cc=david.vrabel@citrix.com \
--cc=hch@lst.de \
--cc=jgross@suse.com \
--cc=konrad.wilk@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sstabellini@kernel.org \
--cc=tglx@linutronix.de \
--cc=x86@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).