[openwrt/openwrt] realtek: align declaration/static/extern function definitions for startup code

LEDE Commits lede-commits at lists.infradead.org
Tue May 27 01:26:50 PDT 2025


robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/7b65949bc4c911c4879dae567cd4efb61da05a2d

commit 7b65949bc4c911c4879dae567cd4efb61da05a2d
Author: Markus Stockhausen <markus.stockhausen at gmx.de>
AuthorDate: Mon May 26 08:11:28 2025 -0400

    realtek: align declaration/static/extern function definitions for startup code
    
    In 2023 upstream has tightened compiler checks with this patch
    https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit
    /scripts/Makefile.extrawarn?h=v6.15&id=0fcb70851fbfea1776ae62f67c503fef8f0292b9
    
    A consistent function definition is now needed. I.e.
    
    - functions must be either declared with "static" or
    - functions need an additional declaration (in the header file)
    
    Before upgrading the Realtek target to 6.12 clean the code so that the main
    6.12 PR can focus on real issues from the version bump.
    
    Signed-off-by: Markus Stockhausen <markus.stockhausen at gmx.de>
    Link: https://github.com/openwrt/openwrt/pull/18925
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 target/linux/realtek/files-6.6/arch/mips/rtl838x/prom.c  | 3 ++-
 target/linux/realtek/files-6.6/arch/mips/rtl838x/setup.c | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/target/linux/realtek/files-6.6/arch/mips/rtl838x/prom.c b/target/linux/realtek/files-6.6/arch/mips/rtl838x/prom.c
index 0452987247..f98fb5e93f 100644
--- a/target/linux/realtek/files-6.6/arch/mips/rtl838x/prom.c
+++ b/target/linux/realtek/files-6.6/arch/mips/rtl838x/prom.c
@@ -19,6 +19,7 @@
 #include <asm/page.h>
 #include <asm/cpu.h>
 #include <asm/fw/fw.h>
+#include <asm/prom.h>
 #include <asm/smp-ops.h>
 #include <asm/mips-cps.h>
 
@@ -95,7 +96,7 @@ void __init device_tree_init(void)
 	register_up_smp_ops();
 }
 
-void __init identify_rtl9302(void)
+static void __init identify_rtl9302(void)
 {
 	switch (sw_r32(RTL93XX_MODEL_NAME_INFO) & 0xfffffff0) {
 	case 0x93020810:
diff --git a/target/linux/realtek/files-6.6/arch/mips/rtl838x/setup.c b/target/linux/realtek/files-6.6/arch/mips/rtl838x/setup.c
index 546b2fa2f8..73d689058e 100644
--- a/target/linux/realtek/files-6.6/arch/mips/rtl838x/setup.c
+++ b/target/linux/realtek/files-6.6/arch/mips/rtl838x/setup.c
@@ -46,7 +46,7 @@ void __init plat_mem_setup(void)
 	__dt_setup_arch(dtb);
 }
 
-void plat_time_init_fallback(void)
+static void plat_time_init_fallback(void)
 {
 	struct device_node *np;
 	u32 freq = 500000000;




More information about the lede-commits mailing list