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
..
2015-01-26 16:09:56 +01:00
2016-09-21 21:18:39 +02:00
2013-12-10 16:11:07 -08:00
2010-02-08 10:42:17 -08:00
2016-12-24 11:46:01 -08:00
2016-12-24 11:46:01 -08:00
2014-06-06 16:08:15 -07:00
2016-12-25 11:04:12 +01:00
2017-01-24 12:23:35 -05:00
2016-06-17 13:45:05 -07:00
2013-11-09 00:16:23 -05:00
2016-08-07 23:55:50 -04:00
2016-11-09 23:45:29 +01:00
2016-08-07 23:55:50 -04:00
2009-12-04 15:39:55 +01:00
2015-06-10 14:26:32 -07:00
2016-12-25 11:04:12 +01:00
2015-12-23 14:27:23 -05:00
2010-03-03 11:25:59 +01:00
2015-06-10 14:26:32 -07:00
2015-06-10 14:26:32 -07:00
2016-08-07 23:55:50 -04:00
2016-08-07 23:55:50 -04:00
2016-12-24 11:46:01 -08:00
2016-01-12 20:46:47 +02:00
2015-03-10 13:54:38 +10:30
2011-03-29 14:48:02 +02:00
2016-12-24 11:46:01 -08:00
2016-08-07 23:55:50 -04:00
2016-12-24 11:46:01 -08:00
2016-08-02 19:35:27 -04:00
2012-03-28 18:30:02 +01:00
2015-06-10 14:26:32 -07:00
2010-03-03 11:25:59 +01:00
2009-10-29 22:34:14 +09:00
2013-03-19 16:14:53 -07:00
2016-10-03 19:43:08 -07:00
2015-06-10 14:26:32 -07:00
2015-12-04 22:46:25 +01:00
2015-07-27 13:36:37 +02:00
2013-12-10 16:11:07 -08:00
2015-03-05 15:25:04 +10:30
2016-08-07 23:55:50 -04:00
2016-11-09 23:45:30 +01:00
2015-06-10 14:26:32 -07:00
2017-01-24 12:23:35 -05:00
2017-01-24 12:23:35 -05:00
2011-03-31 11:26:23 -03:00
2016-12-24 11:46:01 -08:00
2016-12-24 11:46:01 -08:00
2016-12-24 11:46:01 -08:00
2009-10-29 22:34:14 +09:00
2016-12-24 11:46:01 -08:00
2016-08-07 23:55:50 -04:00
2016-12-24 11:46:01 -08:00
2015-03-05 15:25:04 +10:30
2016-03-01 20:36:57 +01:00
2010-09-23 13:52:07 -07:00
2016-12-24 11:46:01 -08:00
2016-12-25 11:04:12 +01:00
2016-11-09 23:45:30 +01:00
2016-12-24 11:46:01 -08:00
2016-12-24 11:46:01 -08:00
2015-09-08 15:35:28 -07:00
2016-12-24 11:46:01 -08:00
2016-10-07 18:46:30 -07:00