[openwrt/openwrt] treewide: Fix const compile errors

LEDE Commits lede-commits at lists.infradead.org
Wed Dec 3 14:31:54 PST 2025


hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/cd9229d06126e40226c01a7f354072bdf777f697

commit cd9229d06126e40226c01a7f354072bdf777f697
Author: Hauke Mehrtens <hauke at hauke-m.de>
AuthorDate: Wed Dec 3 22:46:44 2025 +0100

    treewide: Fix const compile errors
    
    Fixes compile errors caused by static const arrays;
    
    The lantiq firmware is const now.
    
    ATTRIBUTE_GROUPS() does not take const.
    
    Fixes: 5b263f3360b ("treewide: add const to static arrays")
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 package/kernel/lantiq/ltq-atm/src/ifxmips_atm_amazon_se.c               | 2 +-
 package/kernel/lantiq/ltq-atm/src/ifxmips_atm_ar9.c                     | 2 +-
 package/kernel/lantiq/ltq-atm/src/ifxmips_atm_danube.c                  | 2 +-
 package/kernel/lantiq/ltq-atm/src/ifxmips_atm_vr9.c                     | 2 +-
 package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_amazon_se.c               | 2 +-
 package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_ar9.c                     | 2 +-
 package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_danube.c                  | 2 +-
 package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vr9.c                     | 2 +-
 .../902-drivers-mfd-Add-a-driver-for-IEI-WT61P803-PUZZLE-MCU.patch      | 2 +-
 9 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/package/kernel/lantiq/ltq-atm/src/ifxmips_atm_amazon_se.c b/package/kernel/lantiq/ltq-atm/src/ifxmips_atm_amazon_se.c
index 734fe29961..db40bbcaa6 100644
--- a/package/kernel/lantiq/ltq-atm/src/ifxmips_atm_amazon_se.c
+++ b/package/kernel/lantiq/ltq-atm/src/ifxmips_atm_amazon_se.c
@@ -220,7 +220,7 @@ static inline void clear_share_buffer(void)
  *    int       --- 0:    Success
  *                  else:           Error Code
  */
-static inline int pp32_download_code(u32 *code_src, unsigned int code_dword_len, u32 *data_src, unsigned int data_dword_len)
+static inline int pp32_download_code(const u32 *code_src, unsigned int code_dword_len, const u32 *data_src, unsigned int data_dword_len)
 {
     volatile u32 *dest;
 
diff --git a/package/kernel/lantiq/ltq-atm/src/ifxmips_atm_ar9.c b/package/kernel/lantiq/ltq-atm/src/ifxmips_atm_ar9.c
index 28ac8f6c7a..e9949d6af3 100644
--- a/package/kernel/lantiq/ltq-atm/src/ifxmips_atm_ar9.c
+++ b/package/kernel/lantiq/ltq-atm/src/ifxmips_atm_ar9.c
@@ -159,7 +159,7 @@ static inline void clear_share_buffer(void)
         IFX_REG_W32(0, p++);
 }
 
-static inline int pp32_download_code(u32 *code_src, unsigned int code_dword_len, u32 *data_src, unsigned int data_dword_len)
+static inline int pp32_download_code(const u32 *code_src, unsigned int code_dword_len, const u32 *data_src, unsigned int data_dword_len)
 {
     volatile u32 *dest;
 
diff --git a/package/kernel/lantiq/ltq-atm/src/ifxmips_atm_danube.c b/package/kernel/lantiq/ltq-atm/src/ifxmips_atm_danube.c
index 57a50e322d..81df6386fb 100644
--- a/package/kernel/lantiq/ltq-atm/src/ifxmips_atm_danube.c
+++ b/package/kernel/lantiq/ltq-atm/src/ifxmips_atm_danube.c
@@ -106,7 +106,7 @@ static inline void reset_ppe(struct platform_device *pdev)
  *    int       --- 0:    Success
  *                  else:           Error Code
  */
-static inline int danube_pp32_download_code(u32 *code_src, unsigned int code_dword_len, u32 *data_src, unsigned int data_dword_len)
+static inline int danube_pp32_download_code(const u32 *code_src, unsigned int code_dword_len, const u32 *data_src, unsigned int data_dword_len)
 {
 	volatile u32 *dest;
 
diff --git a/package/kernel/lantiq/ltq-atm/src/ifxmips_atm_vr9.c b/package/kernel/lantiq/ltq-atm/src/ifxmips_atm_vr9.c
index ffe079f3df..f6602db921 100644
--- a/package/kernel/lantiq/ltq-atm/src/ifxmips_atm_vr9.c
+++ b/package/kernel/lantiq/ltq-atm/src/ifxmips_atm_vr9.c
@@ -91,7 +91,7 @@ static inline int vr9_reset_ppe(struct platform_device *pdev)
 	return 0;
 }
 
-static inline int vr9_pp32_download_code(int pp32, u32 *code_src, unsigned int code_dword_len, u32 *data_src, unsigned int data_dword_len)
+static inline int vr9_pp32_download_code(int pp32, const u32 *code_src, unsigned int code_dword_len, const u32 *data_src, unsigned int data_dword_len)
 {
 	unsigned int clr, set;
 	volatile u32 *dest;
diff --git a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_amazon_se.c b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_amazon_se.c
index 7548c6d357..541e3dc094 100644
--- a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_amazon_se.c
+++ b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_amazon_se.c
@@ -219,7 +219,7 @@ static inline void clear_share_buffer(void)
  *    int       --- 0:    Success
  *                  else:           Error Code
  */
-static inline int pp32_download_code(u32 *code_src, unsigned int code_dword_len, u32 *data_src, unsigned int data_dword_len)
+static inline int pp32_download_code(const u32 *code_src, unsigned int code_dword_len, const u32 *data_src, unsigned int data_dword_len)
 {
     volatile u32 *dest;
 
diff --git a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_ar9.c b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_ar9.c
index e83268ee36..65a7140284 100644
--- a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_ar9.c
+++ b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_ar9.c
@@ -242,7 +242,7 @@ static inline void clear_share_buffer(void)
  *    int       --- 0:    Success
  *                  else:           Error Code
  */
-static inline int pp32_download_code(u32 *code_src, unsigned int code_dword_len, u32 *data_src, unsigned int data_dword_len)
+static inline int pp32_download_code(const u32 *code_src, unsigned int code_dword_len, const u32 *data_src, unsigned int data_dword_len)
 {
     volatile u32 *dest;
 
diff --git a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_danube.c b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_danube.c
index ef20e9cb45..8ddf6f8274 100644
--- a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_danube.c
+++ b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_danube.c
@@ -214,7 +214,7 @@ static inline void clear_share_buffer(void)
  *    int       --- 0:    Success
  *                  else:           Error Code
  */
-static inline int pp32_download_code(u32 *code_src, unsigned int code_dword_len, u32 *data_src, unsigned int data_dword_len)
+static inline int pp32_download_code(const u32 *code_src, unsigned int code_dword_len, const u32 *data_src, unsigned int data_dword_len)
 {
     volatile u32 *dest;
 
diff --git a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vr9.c b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vr9.c
index 10e71cb1d9..41a0bbbd9f 100644
--- a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vr9.c
+++ b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vr9.c
@@ -202,7 +202,7 @@ static inline void clear_share_buffer(void)
  *    int       --- 0:    Success
  *                  else:           Error Code
  */
-static inline int pp32_download_code(int pp32, u32 *code_src, unsigned int code_dword_len, u32 *data_src, unsigned int data_dword_len)
+static inline int pp32_download_code(int pp32, const u32 *code_src, unsigned int code_dword_len, const u32 *data_src, unsigned int data_dword_len)
 {
     unsigned int clr, set;
     volatile u32 *dest;
diff --git a/target/linux/mvebu/patches-6.12/902-drivers-mfd-Add-a-driver-for-IEI-WT61P803-PUZZLE-MCU.patch b/target/linux/mvebu/patches-6.12/902-drivers-mfd-Add-a-driver-for-IEI-WT61P803-PUZZLE-MCU.patch
index e697a64066..6f99497c36 100644
--- a/target/linux/mvebu/patches-6.12/902-drivers-mfd-Add-a-driver-for-IEI-WT61P803-PUZZLE-MCU.patch
+++ b/target/linux/mvebu/patches-6.12/902-drivers-mfd-Add-a-driver-for-IEI-WT61P803-PUZZLE-MCU.patch
@@ -820,7 +820,7 @@ Cc: Robert Marko <robert.marko at sartura.hr>
 +static IEI_WT61P803_PUZZLE_ATTR_RW(power_loss_recovery, IEI_WT61P803_PUZZLE_POWER_LOSS_RECOVERY, 0);
 +static IEI_WT61P803_PUZZLE_ATTR_RO(power_status, IEI_WT61P803_PUZZLE_POWER_STATUS, 0);
 +
-+static const struct attribute *iei_wt61p803_puzzle_attrs[] = {
++static struct attribute *iei_wt61p803_puzzle_attrs[] = {
 +	&dev_attr_version.dev_attr.attr,
 +	&dev_attr_build_info.dev_attr.attr,
 +	&dev_attr_bootloader_mode.dev_attr.attr,




More information about the lede-commits mailing list