[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH 5/6] 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, ®_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"; | ^ In both cases, just make the relevant variable const. Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> --- CC: Stefano Stabellini <sstabellini@xxxxxxxxxx> CC: Julien Grall <julien@xxxxxxx> CC: Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx> CC: Bertrand Marquis <bertrand.marquis@xxxxxxx> CC: Michal Orzel <michal.orzel@xxxxxxx> CC: Roberto Bagnara <roberto.bagnara@xxxxxxxxxxx> CC: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx> --- xen/arch/arm/platforms/brcm.c | 2 +- xen/arch/arm/platforms/exynos5.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/arch/arm/platforms/brcm.c b/xen/arch/arm/platforms/brcm.c index 951e4d6cc328..43a07ab1a69d 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 c48093cd4fa4..f7c09520675e 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; -- 2.30.2
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |