Bart Van Assche
5299709d0a
treewide: Constify most dma_map_ops structures
Most dma_map_ops structures are never modified. Constify these
structures such that these can be write-protected. This patch
has been generated as follows:
git grep -l 'struct dma_map_ops' |
xargs -d\\n sed -i \
-e 's/struct dma_map_ops/const struct dma_map_ops/g' \
-e 's/const struct dma_map_ops {/struct dma_map_ops {/g' \
-e 's/^const struct dma_map_ops;$/struct dma_map_ops;/' \
-e 's/const const struct dma_map_ops /const struct dma_map_ops /g';
sed -i -e 's/const \(struct dma_map_ops intel_dma_ops\)/\1/' \
$(git grep -l 'struct dma_map_ops intel_dma_ops');
sed -i -e 's/const \(struct dma_map_ops dma_iommu_ops\)/\1/' \
$(git grep -l 'struct dma_map_ops' | grep ^arch/powerpc);
sed -i -e '/^struct vmd_dev {$/,/^};$/ s/const \(struct dma_map_ops[[:blank:]]dma_ops;\)/\1/' \
-e '/^static void vmd_setup_dma_ops/,/^}$/ s/const \(struct dma_map_ops \*dest\)/\1/' \
-e 's/const \(struct dma_map_ops \*dest = \&vmd->dma_ops\)/\1/' \
drivers/pci/host/*.c
sed -i -e '/^void __init pci_iommu_alloc(void)$/,/^}$/ s/dma_ops->/intel_dma_ops./' arch/ia64/kernel/pci-dma.c
sed -i -e 's/static const struct dma_map_ops sn_dma_ops/static struct dma_map_ops sn_dma_ops/' arch/ia64/sn/pci/pci_dma.c
sed -i -e 's/(const struct dma_map_ops \*)//' drivers/misc/mic/bus/vop_bus.c
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Juergen Gross <jgross@suse.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: linux-arch@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: Russell King <linux@armlinux.org.uk>
Cc: x86@kernel.org
Signed-off-by: Doug Ledford <dledford@redhat.com>
2017-01-24 12:23:35 -05:00
..
2016-11-15 13:58:37 +01:00
2013-02-12 11:24:44 +01:00
2010-05-06 11:21:58 +02:00
2017-01-24 12:23:35 -05:00
2013-04-29 18:28:13 -07:00
2013-02-03 18:16:02 -05:00
2015-03-04 15:12:27 +01:00
2013-02-12 11:24:45 +01:00
2016-08-24 12:15:14 +02:00
2014-06-05 13:02:02 +02:00
2014-03-12 10:10:06 +01:00
2014-01-27 11:26:33 +01:00
2016-11-29 09:14:49 +00:00
2015-06-08 09:57:08 +02:00
2016-11-29 09:14:49 +00:00
2014-07-18 13:57:08 -04:00
2013-02-12 11:24:45 +01:00
2012-03-23 09:28:19 +01:00
2013-02-12 11:24:45 +01:00
2014-04-07 13:45:21 +02:00
2014-04-07 13:45:17 +02:00
2014-04-30 00:59:16 -05:00
2015-01-05 12:36:43 +01:00
2015-01-05 12:36:42 +01:00
2016-02-09 12:03:25 +01:00
2015-04-15 13:53:55 -07:00
2013-02-12 11:24:45 +01:00
2013-11-08 15:20:44 +01:00
2016-11-15 13:58:36 +01:00
2016-12-25 11:04:12 +01:00
2013-04-30 17:04:02 -07:00
2015-01-05 12:36:44 +01:00
2016-10-07 18:46:30 -07:00