Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Julia Lawall and committed by
Ingo Molnar
d6b56b0b 7a9c2dd0

+3 -3
+1 -1
arch/x86/include/asm/calgary.h
··· 31 31 #include <asm/types.h> 32 32 33 33 struct iommu_table { 34 - struct cal_chipset_ops *chip_ops; /* chipset specific funcs */ 34 + const struct cal_chipset_ops *chip_ops; /* chipset specific funcs */ 35 35 unsigned long it_base; /* mapped address of tce table */ 36 36 unsigned long it_hint; /* Hint for next alloc */ 37 37 unsigned long *it_map; /* A simple allocation bitmap for now */
+2 -2
arch/x86/kernel/pci-calgary_64.c
··· 180 180 static void calgary_init_bitmap_from_tce_table(struct iommu_table *tbl); 181 181 static void get_tce_space_from_tar(void); 182 182 183 - static struct cal_chipset_ops calgary_chip_ops = { 183 + static const struct cal_chipset_ops calgary_chip_ops = { 184 184 .handle_quirks = calgary_handle_quirks, 185 185 .tce_cache_blast = calgary_tce_cache_blast, 186 186 .dump_error_regs = calgary_dump_error_regs 187 187 }; 188 188 189 - static struct cal_chipset_ops calioc2_chip_ops = { 189 + static const struct cal_chipset_ops calioc2_chip_ops = { 190 190 .handle_quirks = calioc2_handle_quirks, 191 191 .tce_cache_blast = calioc2_tce_cache_blast, 192 192 .dump_error_regs = calioc2_dump_error_regs