]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
x86/mce: Make mce_subsys const
authorRicardo B. Marliere <ricardo@marliere.net>
Sun, 4 Feb 2024 14:32:29 +0000 (11:32 -0300)
committerBorislav Petkov (AMD) <bp@alien8.de>
Mon, 5 Feb 2024 09:26:51 +0000 (10:26 +0100)
Now that the driver core can properly handle constant struct bus_type,
make mce_subsys a constant structure.

Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20240204-bus_cleanup-x86-v1-1-4e7171be88e8@marliere.net
arch/x86/kernel/cpu/mce/core.c

index bc39252bc54f2ec8a834961639d180b3f84c13ac..a2f78f64798a38e80ce1dc257223b98be6edd56e 100644 (file)
@@ -2431,7 +2431,7 @@ static void mce_enable_ce(void *all)
                __mcheck_cpu_init_timer();
 }
 
-static struct bus_type mce_subsys = {
+static const struct bus_type mce_subsys = {
        .name           = "machinecheck",
        .dev_name       = "machinecheck",
 };