aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulia Lawall <Julia.Lawall@lip6.fr>2015-11-28 10:58:15 -0500
committerIngo Molnar <mingo@kernel.org>2015-11-29 02:50:58 -0500
commitd6b56b0bc68ba7927b286da86eda1d4d4dbe63f6 (patch)
tree1540651bb933b3b8bc5a4daa410e748aa6ec9654
parent7a9c2dd08eadd5c6943115dbbec040c38d2e0822 (diff)
x86/platform/calgary: Constify cal_chipset_ops structures
The cal_chipset_ops structures are never modified, so declare them as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Cc: Borislav Petkov <bp@alien8.de> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Jon D. Mason <jdmason@kudzu.us> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Muli Ben-Yehuda <muli@il.ibm.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/r/1448726295-10959-1-git-send-email-Julia.Lawall@lip6.fr Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r--arch/x86/include/asm/calgary.h2
-rw-r--r--arch/x86/kernel/pci-calgary_64.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/arch/x86/include/asm/calgary.h b/arch/x86/include/asm/calgary.h
index 0d467b338835..a8303ebe089f 100644
--- a/arch/x86/include/asm/calgary.h
+++ b/arch/x86/include/asm/calgary.h
@@ -31,7 +31,7 @@
31#include <asm/types.h> 31#include <asm/types.h>
32 32
33struct iommu_table { 33struct iommu_table {
34 struct cal_chipset_ops *chip_ops; /* chipset specific funcs */ 34 const struct cal_chipset_ops *chip_ops; /* chipset specific funcs */
35 unsigned long it_base; /* mapped address of tce table */ 35 unsigned long it_base; /* mapped address of tce table */
36 unsigned long it_hint; /* Hint for next alloc */ 36 unsigned long it_hint; /* Hint for next alloc */
37 unsigned long *it_map; /* A simple allocation bitmap for now */ 37 unsigned long *it_map; /* A simple allocation bitmap for now */
diff --git a/arch/x86/kernel/pci-calgary_64.c b/arch/x86/kernel/pci-calgary_64.c
index 0497f719977d..833b1d329c47 100644
--- a/arch/x86/kernel/pci-calgary_64.c
+++ b/arch/x86/kernel/pci-calgary_64.c
@@ -180,13 +180,13 @@ static void calioc2_dump_error_regs(struct iommu_table *tbl);
180static void calgary_init_bitmap_from_tce_table(struct iommu_table *tbl); 180static void calgary_init_bitmap_from_tce_table(struct iommu_table *tbl);
181static void get_tce_space_from_tar(void); 181static void get_tce_space_from_tar(void);
182 182
183static struct cal_chipset_ops calgary_chip_ops = { 183static const struct cal_chipset_ops calgary_chip_ops = {
184 .handle_quirks = calgary_handle_quirks, 184 .handle_quirks = calgary_handle_quirks,
185 .tce_cache_blast = calgary_tce_cache_blast, 185 .tce_cache_blast = calgary_tce_cache_blast,
186 .dump_error_regs = calgary_dump_error_regs 186 .dump_error_regs = calgary_dump_error_regs
187}; 187};
188 188
189static struct cal_chipset_ops calioc2_chip_ops = { 189static const struct cal_chipset_ops calioc2_chip_ops = {
190 .handle_quirks = calioc2_handle_quirks, 190 .handle_quirks = calioc2_handle_quirks,
191 .tce_cache_blast = calioc2_tce_cache_blast, 191 .tce_cache_blast = calioc2_tce_cache_blast,
192 .dump_error_regs = calioc2_dump_error_regs 192 .dump_error_regs = calioc2_dump_error_regs