]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
realtek: align declaration/static/extern function definitions for clock driver
authorMarkus Stockhausen <markus.stockhausen@gmx.de>
Mon, 26 May 2025 12:13:29 +0000 (08:13 -0400)
committerRobert Marko <robimarko@gmail.com>
Tue, 27 May 2025 08:26:18 +0000 (10:26 +0200)
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@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/18925
Signed-off-by: Robert Marko <robimarko@gmail.com>
target/linux/realtek/files-6.6/drivers/clk/realtek/clk-rtl83xx.c

index 0cca32ab3447b271fb36e09d41bb7c2173bbf480..bdec59830df5f7d77e43062ca01aacbde3918429 100644 (file)
@@ -504,7 +504,7 @@ static int rtcl_ccu_create(struct device_node *np)
        return 0;
 }
 
-int rtcl_register_clkhw(int clk_idx)
+static int rtcl_register_clkhw(int clk_idx)
 {
        int ret;
        struct clk *clk;
@@ -592,7 +592,7 @@ err_hw_unregister:
        return ret;
 }
 
-int rtcl_init_sram(void)
+static int rtcl_init_sram(void)
 {
        struct gen_pool *sram_pool;
        phys_addr_t sram_pbase;
@@ -665,7 +665,7 @@ err_put_device:
        return -ENXIO;
 }
 
-void rtcl_ccu_log_early(void)
+static void rtcl_ccu_log_early(void)
 {
        char meminfo[80], clkinfo[255], msg[255] = "rtl83xx-clk: initialized";
 
@@ -680,7 +680,7 @@ void rtcl_ccu_log_early(void)
        pr_info("%s\n", msg);
 }
 
-void rtcl_ccu_log_late(void)
+static void rtcl_ccu_log_late(void)
 {
        struct rtcl_clk *rclk;
        bool overclock = false;