[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xen master] arm/platforms: Make compatbile with -Wwrite-strings



commit 10081c2dc571775b538bb00982606a39832ad7e3
Author:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
AuthorDate: Mon Nov 20 21:33:59 2023 +0000
Commit:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CommitDate: Tue Nov 21 13:28:51 2023 +0000

    arm/platforms: Make compatbile with -Wwrite-strings
    
    GCC complains:
    
      arch/arm/platforms/brcm.c: In function â??brcm_populate_plat_regsâ??:
      arch/arm/platforms/brcm.c:76:27: error: passing argument 1 of 
â??brcm_get_dt_nodeâ?? discards â??constâ?? qualifier from pointer target type 
[-Werror=discarded-qualifiers]
         76 |     rc = brcm_get_dt_node("brcm,brcmstb-cpu-biu-ctrl", &node, 
&reg_base);
            |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    and
    
      arch/arm/platforms/exynos5.c: In function â??exynos5_smp_initâ??:
      arch/arm/platforms/exynos5.c:109:20: error: assignment discards 
â??constâ?? qualifier from pointer target type [-Werror=discarded-qualifiers]
        109 |         compatible = "samsung,exynos4210-sysram-ns";
            |                    ^
    
      arch/arm/acpi/domain_build.c: In function 'acpi_create_xsdt':
      ./include/acpi/actbl.h:66:33: error: passing argument 3 of 
'acpi_xsdt_modify_entry' discards 'const' qualifier from pointer target type 
[-Werror=discarded-qualifiers]
         66 | #define ACPI_SIG_FADT           "FACP"  /* Fixed ACPI Description 
Table */
            |                                 ^~~~~~
    
    In all cases, just make the relevant variable const.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
    Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>
---
 xen/arch/arm/acpi/domain_build.c | 2 +-
 xen/arch/arm/platforms/brcm.c    | 2 +-
 xen/arch/arm/platforms/exynos5.c | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/xen/arch/arm/acpi/domain_build.c b/xen/arch/arm/acpi/domain_build.c
index ed824c0178..b58389ce9e 100644
--- a/xen/arch/arm/acpi/domain_build.c
+++ b/xen/arch/arm/acpi/domain_build.c
@@ -245,7 +245,7 @@ static int __init acpi_create_rsdp(struct domain *d, struct 
membank tbl_add[])
 
 static void __init acpi_xsdt_modify_entry(u64 entry[],
                                           unsigned long entry_count,
-                                          char *signature, u64 addr)
+                                          const char *signature, u64 addr)
 {
     int i;
     struct acpi_table_header *table;
diff --git a/xen/arch/arm/platforms/brcm.c b/xen/arch/arm/platforms/brcm.c
index 951e4d6cc3..43a07ab1a6 100644
--- a/xen/arch/arm/platforms/brcm.c
+++ b/xen/arch/arm/platforms/brcm.c
@@ -35,7 +35,7 @@ static u32 brcm_boot_continuation_pc;
 
 static struct brcm_plat_regs regs;
 
-static __init int brcm_get_dt_node(char *compat_str,
+static __init int brcm_get_dt_node(const char *compat_str,
                                    const struct dt_device_node **dn,
                                    u32 *reg_base)
 {
diff --git a/xen/arch/arm/platforms/exynos5.c b/xen/arch/arm/platforms/exynos5.c
index c48093cd4f..f7c0952067 100644
--- a/xen/arch/arm/platforms/exynos5.c
+++ b/xen/arch/arm/platforms/exynos5.c
@@ -96,7 +96,7 @@ static int __init exynos5_smp_init(void)
 {
     struct dt_device_node *node;
     void __iomem *sysram;
-    char *compatible;
+    const char *compatible;
     paddr_t sysram_addr;
     paddr_t size;
     paddr_t sysram_offset;
--
generated by git-patchbot for /home/xen/git/xen.git#master



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.