ipq806x: fix build errors on 6.12 kernel
authorShiji Yang <yangshiji66@outlook.com>
Sat, 31 May 2025 16:41:31 +0000 (00:41 +0800)
committerChristian Marangi <ansuelsmth@gmail.com>
Tue, 14 Oct 2025 08:27:26 +0000 (10:27 +0200)
commit1125d07cf40e72dfb380e830c61e7c40fc9c40bd
tree8184849897012499c4c82dbb8aed1a51913bd502
parent1a76ae32699566cda30fe252ee6c499f9b25a2bb
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@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/18989
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
target/linux/ipq806x/patches-6.12/114-01-devfreq-qcom-Add-L2-Krait-Cache-devfreq-scaling-driv.patch
target/linux/ipq806x/patches-6.12/115-01-devfreq-add-ipq806x-fabric-scaling-driver.patch
target/linux/ipq806x/patches-6.12/900-arm-add-cmdline-override.patch