lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160912114539.GB7597@gmail.com>
Date:   Mon, 12 Sep 2016 13:45:40 +0200
From:   Ingo Molnar <mingo@...nel.org>
To:     Christoph Hellwig <hch@....de>
Cc:     sstabellini@...nel.org, konrad.wilk@...cle.com,
        boris.ostrovsky@...cle.com, david.vrabel@...rix.com,
        jgross@...e.com, x86@...nel.org, linux-kernel@...r.kernel.org,
        Thomas Gleixner <tglx@...utronix.de>,
        Peter Zijlstra <a.p.zijlstra@...llo.nl>
Subject: Re: [PATCH] xen: consolidate swiotbl_xen dma_ops


* Christoph Hellwig <hch@....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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ