]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
realtek: harmonize variables in prom.c
authorMarkus Stockhausen <markus.stockhausen@gmx.de>
Tue, 30 Dec 2025 08:59:26 +0000 (09:59 +0100)
committerHauke Mehrtens <hauke@hauke-m.de>
Wed, 31 Dec 2025 20:55:32 +0000 (21:55 +0100)
There is mix of variable naming in prom.c. Use a fixed
prefix of "rtl_" for all static variables. Additionally
remove the prefix from rtl83xx_set_system_type as it is
a generic function for all SoC types.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21327
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
target/linux/realtek/files-6.12/arch/mips/rtl838x/prom.c

index 2e668ee0785a4493297b0781b2b7d208b9316375..94d659913cbaa50f5952a46e32469c54994d67a3 100644 (file)
 struct rtl83xx_soc_info soc_info;
 const void *fdt;
 
-static char soc_name[16];
-static char rtl83xx_system_type[48];
+static char rtl_soc_name[16];
+static char rtl_system_type[48];
 
 #ifdef CONFIG_MIPS_MT_SMP
 
 extern const struct plat_smp_ops vsmp_smp_ops;
-static struct plat_smp_ops rtlops;
+static struct plat_smp_ops rtl_smp_ops;
 
 static void rtlsmp_init_secondary(void)
 {
@@ -62,10 +62,10 @@ static int rtlsmp_register(void)
        if (!cpu_has_mipsmt)
                return 1;
 
-       rtlops = vsmp_smp_ops;
-       rtlops.init_secondary = rtlsmp_init_secondary;
-       rtlops.smp_finish = rtlsmp_finish;
-       register_smp_ops(&rtlops);
+       rtl_smp_ops = vsmp_smp_ops;
+       rtl_smp_ops.init_secondary = rtlsmp_init_secondary;
+       rtl_smp_ops.smp_finish = rtlsmp_finish;
+       register_smp_ops(&rtl_smp_ops);
 
        return 0;
 }
@@ -99,7 +99,7 @@ void __init device_tree_init(void)
 
 const char *get_system_type(void)
 {
-       return rtl83xx_system_type;
+       return rtl_system_type;
 }
 
 static void __init rtl838x_read_details(u32 model)
@@ -206,13 +206,13 @@ static void __init parse_model(u32 model)
        if (val > 0 && val <= 26)
                suffix = 'A' + (val - 1);
 
-       snprintf(soc_name, sizeof(soc_name), "RTL%04X%c",
+       snprintf(rtl_soc_name, sizeof(rtl_soc_name), "RTL%04X%c",
                 soc_info.id, suffix);
 
-       soc_info.name = soc_name;
+       soc_info.name = rtl_soc_name;
 }
 
-static void __init rtl83xx_set_system_type(void)
+static void __init set_system_type(void)
 {
        char revision = '?';
        char *es = "";
@@ -223,7 +223,7 @@ static void __init rtl83xx_set_system_type(void)
        if (soc_info.testchip)
                es = " ES";
 
-       snprintf(rtl83xx_system_type, sizeof(rtl83xx_system_type),
+       snprintf(rtl_system_type, sizeof(rtl_system_type),
                 "Realtek %s%s rev %c (%04X)",
                 soc_info.name, es, revision, soc_info.cpu);
 }
@@ -233,7 +233,7 @@ void __init prom_init(void)
        u32 model = read_model();
 
        parse_model(model);
-       rtl83xx_set_system_type();
+       set_system_type();
 
        pr_info("SoC Type: %s\n", get_system_type());