From d32b8d7e3d207bf4d5ae06b1e0fca27fd7639371 Mon Sep 17 00:00:00 2001 From: "Ricardo B. Marliere" Date: Sun, 4 Feb 2024 12:15:09 -0300 Subject: sh: dma-sysfs: Make dma_subsys const Now that the driver core can properly handle constant struct bus_type, move the dma_subsys variable to be a constant structure as well, placing it into read-only memory which can not be modified at runtime. Cc: Greg Kroah-Hartman Suggested-by: Greg Kroah-Hartman Signed-off-by: Ricardo B. Marliere Reviewed-by: Geert Uytterhoeven Reviewed-by: Greg Kroah-Hartman Reviewed-by: John Paul Adrian Glaubitz Link: https://lore.kernel.org/r/20240204-bus_cleanup-sh-v1-1-44ced951bb16@marliere.net Signed-off-by: John Paul Adrian Glaubitz --- arch/sh/drivers/dma/dma-sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/sh/drivers/dma/dma-sysfs.c b/arch/sh/drivers/dma/dma-sysfs.c index 431bc18f0a411..9f666280d80cc 100644 --- a/arch/sh/drivers/dma/dma-sysfs.c +++ b/arch/sh/drivers/dma/dma-sysfs.c @@ -15,7 +15,7 @@ #include #include -static struct bus_type dma_subsys = { +static const struct bus_type dma_subsys = { .name = "dma", .dev_name = "dma", }; -- cgit 1.2.3-korg From ad4acb2ec205464e5c352c0466603174aecb3a38 Mon Sep 17 00:00:00 2001 From: "Ricardo B. Marliere" Date: Thu, 8 Feb 2024 16:56:52 -0300 Subject: sh: intc: Make intc_subsys const Now that the driver core can properly handle constant struct bus_type, move the make intc_subsys variable to be a constant structure as well, placing it into read-only memory which can not be modified at runtime. Cc: Greg Kroah-Hartman Suggested-by: Greg Kroah-Hartman Signed-off-by: Ricardo B. Marliere Reviewed-by: Greg Kroah-Hartman Reviewed-by: John Paul Adrian Glaubitz Link: https://lore.kernel.org/r/20240208-bus_cleanup-sh2-v1-1-729277400893@marliere.net Signed-off-by: John Paul Adrian Glaubitz --- drivers/sh/intc/core.c | 2 +- drivers/sh/intc/internals.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/sh/intc/core.c b/drivers/sh/intc/core.c index ca4f4ca413f11..74350b5871dc8 100644 --- a/drivers/sh/intc/core.c +++ b/drivers/sh/intc/core.c @@ -455,7 +455,7 @@ struct syscore_ops intc_syscore_ops = { .resume = intc_resume, }; -struct bus_type intc_subsys = { +const struct bus_type intc_subsys = { .name = "intc", .dev_name = "intc", }; diff --git a/drivers/sh/intc/internals.h b/drivers/sh/intc/internals.h index fa73c173b56a6..9b6cd1bebb4e3 100644 --- a/drivers/sh/intc/internals.h +++ b/drivers/sh/intc/internals.h @@ -160,7 +160,7 @@ void _intc_enable(struct irq_data *data, unsigned long handle); /* core.c */ extern struct list_head intc_list; extern raw_spinlock_t intc_big_lock; -extern struct bus_type intc_subsys; +extern const struct bus_type intc_subsys; unsigned int intc_get_dfl_prio_level(void); unsigned int intc_get_prio_level(unsigned int irq); -- cgit 1.2.3-korg From 1e21acb7fbfb15fcb4afe21fb5a50a1bc00743ec Mon Sep 17 00:00:00 2001 From: Artur Rojek Date: Sun, 11 Feb 2024 20:34:51 +0100 Subject: sh: hd64461: Make setup_hd64461() static Enforce internal linkage for setup_hd64461(). This fixes the following error: arch/sh/cchips/hd6446x/hd64461.c:75:12: error: no previous prototype for 'setup_hd64461' [-Werror=missing-prototypes] Signed-off-by: Artur Rojek Reviewed-by: John Paul Adrian Glaubitz Link: https://lore.kernel.org/r/20240211193451.106795-1-contact@artur-rojek.eu Signed-off-by: John Paul Adrian Glaubitz --- arch/sh/cchips/hd6446x/hd64461.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/sh/cchips/hd6446x/hd64461.c b/arch/sh/cchips/hd6446x/hd64461.c index f3fba967445ac..81764882d87d3 100644 --- a/arch/sh/cchips/hd6446x/hd64461.c +++ b/arch/sh/cchips/hd6446x/hd64461.c @@ -72,7 +72,7 @@ static void hd64461_irq_demux(struct irq_desc *desc) } } -int __init setup_hd64461(void) +static int __init setup_hd64461(void) { int irq_base, i; -- cgit 1.2.3-korg