[openwrt/openwrt] ipq806x: fix build errors on 6.12 kernel
LEDE Commits
lede-commits at lists.infradead.org
Tue Oct 14 01:28:01 PDT 2025
ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/1125d07cf40e72dfb380e830c61e7c40fc9c40bd
commit 1125d07cf40e72dfb380e830c61e7c40fc9c40bd
Author: Shiji Yang <yangshiji66 at outlook.com>
AuthorDate: Sun Jun 1 00:41:31 2025 +0800
ipq806x: fix build errors on 6.12 kernel
- Replace "strlcpy()" with "strscpy()".
- Convert platform driver .remove() to .remove_new().
This patch fixes the following compile errors:
drivers/of/fdt.c:1064:17: error: implicit declaration of function 'strlcpy'; did you mean 'strncpy'? [-Wimplicit-function-declaration]
1064 | strlcpy(cmdline, p, min((int)l, COMMAND_LINE_SIZE));
| ^~~~~~~
| strncpy
drivers/devfreq/krait-cache-devfreq.c:171:27: error: initialization of 'void (*)(struct platform_device *)' from incompatible pointer type 'int (*)(struct platform_device *)' [-Wincompatible-pointer-types]
171 | .remove = krait_cache_remove,
| ^~~~~~~~~~~~~~~~~~
drivers/devfreq/ipq806x-fab-devfreq.c:145:27: error: initialization of 'void (*)(struct platform_device *)' from incompatible pointer type 'int (*)(struct platform_device *)' [-Wincompatible-pointer-types]
145 | .remove = ipq806x_fab_remove,
| ^~~~~~~~~~~~~~~~~~
Signed-off-by: Shiji Yang <yangshiji66 at outlook.com>
Link: https://github.com/openwrt/openwrt/pull/18989
Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
...-01-devfreq-qcom-Add-L2-Krait-Cache-devfreq-scaling-driv.patch | 8 +++-----
.../115-01-devfreq-add-ipq806x-fabric-scaling-driver.patch | 8 +++-----
.../linux/ipq806x/patches-6.12/900-arm-add-cmdline-override.patch | 2 +-
3 files changed, 7 insertions(+), 11 deletions(-)
diff --git a/target/linux/ipq806x/patches-6.12/114-01-devfreq-qcom-Add-L2-Krait-Cache-devfreq-scaling-driv.patch b/target/linux/ipq806x/patches-6.12/114-01-devfreq-qcom-Add-L2-Krait-Cache-devfreq-scaling-driv.patch
index 9780f6a30b..82a0a833f1 100644
--- a/target/linux/ipq806x/patches-6.12/114-01-devfreq-qcom-Add-L2-Krait-Cache-devfreq-scaling-driv.patch
+++ b/target/linux/ipq806x/patches-6.12/114-01-devfreq-qcom-Add-L2-Krait-Cache-devfreq-scaling-driv.patch
@@ -51,7 +51,7 @@ Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
obj-$(CONFIG_PM_DEVFREQ_EVENT) += event/
--- /dev/null
+++ b/drivers/devfreq/krait-cache-devfreq.c
-@@ -0,0 +1,181 @@
+@@ -0,0 +1,179 @@
+// SPDX-License-Identifier: GPL-2.0
+
+#include <linux/kernel.h>
@@ -206,13 +206,11 @@ Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
+ return ret;
+};
+
-+static int krait_cache_remove(struct platform_device *pdev)
++static void krait_cache_remove(struct platform_device *pdev)
+{
+ struct krait_cache_data *data = dev_get_drvdata(&pdev->dev);
+
+ dev_pm_opp_clear_config(data->token);
-+
-+ return 0;
+};
+
+static const struct of_device_id krait_cache_match_table[] = {
@@ -222,7 +220,7 @@ Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
+
+static struct platform_driver krait_cache_driver = {
+ .probe = krait_cache_probe,
-+ .remove = krait_cache_remove,
++ .remove_new = krait_cache_remove,
+ .driver = {
+ .name = "krait-cache-scaling",
+ .of_match_table = krait_cache_match_table,
diff --git a/target/linux/ipq806x/patches-6.12/115-01-devfreq-add-ipq806x-fabric-scaling-driver.patch b/target/linux/ipq806x/patches-6.12/115-01-devfreq-add-ipq806x-fabric-scaling-driver.patch
index c359eda2a5..67dab1a6e6 100644
--- a/target/linux/ipq806x/patches-6.12/115-01-devfreq-add-ipq806x-fabric-scaling-driver.patch
+++ b/target/linux/ipq806x/patches-6.12/115-01-devfreq-add-ipq806x-fabric-scaling-driver.patch
@@ -45,7 +45,7 @@ Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
obj-$(CONFIG_PM_DEVFREQ_EVENT) += event/
--- /dev/null
+++ b/drivers/devfreq/ipq806x-fab-devfreq.c
-@@ -0,0 +1,155 @@
+@@ -0,0 +1,153 @@
+// SPDX-License-Identifier: GPL-2.0
+
+#include <linux/kernel.h>
@@ -168,7 +168,7 @@ Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
+ return PTR_ERR(clk);
+};
+
-+static int ipq806x_fab_remove(struct platform_device *pdev)
++static void ipq806x_fab_remove(struct platform_device *pdev)
+{
+ struct ipq806x_fab_data *data = dev_get_drvdata(&pdev->dev);
+
@@ -179,8 +179,6 @@ Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
+ clk_put(data->ddr_clk);
+
+ dev_pm_opp_remove_table(&pdev->dev);
-+
-+ return 0;
+};
+
+static const struct of_device_id ipq806x_fab_match_table[] = {
@@ -190,7 +188,7 @@ Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
+
+static struct platform_driver ipq806x_fab_driver = {
+ .probe = ipq806x_fab_probe,
-+ .remove = ipq806x_fab_remove,
++ .remove_new = ipq806x_fab_remove,
+ .driver = {
+ .name = "ipq806x-fab-scaling",
+ .of_match_table = ipq806x_fab_match_table,
diff --git a/target/linux/ipq806x/patches-6.12/900-arm-add-cmdline-override.patch b/target/linux/ipq806x/patches-6.12/900-arm-add-cmdline-override.patch
index 0d87770486..cd5c8c016d 100644
--- a/target/linux/ipq806x/patches-6.12/900-arm-add-cmdline-override.patch
+++ b/target/linux/ipq806x/patches-6.12/900-arm-add-cmdline-override.patch
@@ -29,7 +29,7 @@
+#ifdef CONFIG_CMDLINE_OVERRIDE
+ p = of_get_flat_dt_prop(node, "bootargs-override", &l);
+ if (p != NULL && l > 0)
-+ strlcpy(cmdline, p, min((int)l, COMMAND_LINE_SIZE));
++ strscpy(cmdline, p, min((int)l, COMMAND_LINE_SIZE));
+#endif
+
handle_cmdline:
More information about the lede-commits
mailing list