From 8f06ce35125869f631a3c7a072503103feca227c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20Neusch=C3=A4fer?= Date: Mon, 20 Nov 2017 01:56:44 +0100 Subject: Constify struct cpu_device_id instances MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There is currently no case where a struct cpu_device_id instance needs to be modified. Thus, declare all instances as const. Change-Id: I5ec7460b56d75d255b3451d76a46df76a51d6365 Signed-off-by: Jonathan Neuschäfer Reviewed-on: https://review.coreboot.org/22526 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel Reviewed-by: Aaron Durbin --- src/arch/arm/include/armv7/arch/cpu.h | 2 +- src/arch/mips/include/arch/cpu.h | 2 +- src/arch/power8/include/arch/cpu.h | 2 +- src/arch/riscv/include/arch/cpu.h | 2 +- src/arch/x86/cpu.c | 2 +- src/arch/x86/include/arch/cpu.h | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src/arch') diff --git a/src/arch/arm/include/armv7/arch/cpu.h b/src/arch/arm/include/armv7/arch/cpu.h index b7ef20d5d5..18d86e0969 100644 --- a/src/arch/arm/include/armv7/arch/cpu.h +++ b/src/arch/arm/include/armv7/arch/cpu.h @@ -25,7 +25,7 @@ struct cpu_driver { struct device_operations *ops; - struct cpu_device_id *id_table; + const struct cpu_device_id *id_table; }; struct thread; diff --git a/src/arch/mips/include/arch/cpu.h b/src/arch/mips/include/arch/cpu.h index d43fd624a6..f9f619739c 100644 --- a/src/arch/mips/include/arch/cpu.h +++ b/src/arch/mips/include/arch/cpu.h @@ -24,7 +24,7 @@ struct cpu_driver { struct device_operations *ops; - struct cpu_device_id *id_table; + const struct cpu_device_id *id_table; }; struct thread; diff --git a/src/arch/power8/include/arch/cpu.h b/src/arch/power8/include/arch/cpu.h index 9acc2a8ab2..e0fb72c29d 100644 --- a/src/arch/power8/include/arch/cpu.h +++ b/src/arch/power8/include/arch/cpu.h @@ -23,7 +23,7 @@ struct cpu_driver { struct device_operations *ops; - struct cpu_device_id *id_table; + const struct cpu_device_id *id_table; }; struct thread; diff --git a/src/arch/riscv/include/arch/cpu.h b/src/arch/riscv/include/arch/cpu.h index ae5cbda67f..a0ca3ce534 100644 --- a/src/arch/riscv/include/arch/cpu.h +++ b/src/arch/riscv/include/arch/cpu.h @@ -23,7 +23,7 @@ struct cpu_driver { struct device_operations *ops; - struct cpu_device_id *id_table; + const struct cpu_device_id *id_table; }; struct thread; diff --git a/src/arch/x86/cpu.c b/src/arch/x86/cpu.c index ff82661447..cfcfdbd5d2 100644 --- a/src/arch/x86/cpu.c +++ b/src/arch/x86/cpu.c @@ -203,7 +203,7 @@ struct cpu_driver *find_cpu_driver(struct device *cpu) { struct cpu_driver *driver; for (driver = _cpu_drivers; driver < _ecpu_drivers; driver++) { - struct cpu_device_id *id; + const struct cpu_device_id *id; for (id = driver->id_table; id->vendor != X86_VENDOR_INVALID; id++) { if ((cpu->vendor == id->vendor) && diff --git a/src/arch/x86/include/arch/cpu.h b/src/arch/x86/include/arch/cpu.h index 1cba0affa9..5d44aaeb6c 100644 --- a/src/arch/x86/include/arch/cpu.h +++ b/src/arch/x86/include/arch/cpu.h @@ -178,7 +178,7 @@ struct cpu_device_id { struct cpu_driver { struct device_operations *ops; - struct cpu_device_id *id_table; + const struct cpu_device_id *id_table; struct acpi_cstate *cstates; }; -- cgit v1.2.3