xen: driver/char: fix const declaration of DT compatible list
PATCH 1/1 xen: driver/char: fix const declaration of DT compatible list
The data type for DT compatible list should be:
const char * const[] __initconst
Fix every serial drivers which support device tree.
Spotted-by Jan Beulich <[email protected]>
Signed-off-by Julien Grall <[email protected]>
--- xen/drivers/char/exynos4210-uart.c | 2 +- xen/drivers/char/ns16550.c | 2 +- xen/drivers/char/omap-uart.c | 2 +- xen/drivers/char/pl011.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)
xen/drivers/char/exynos4210-uart.c +1 -1
@@ -358,7 +358,7 @@ static int __init exynos4210_uart_init(struct dt_device_node *dev,return 0 ; } -static const char const *exynos4210_dt_compat[]__initdata = +static const char *const exynos4210_dt_compat[]__initconst = {"samsung,exynos4210-uart" ,NULL
xen/drivers/char/ns16550.c +1 -1
@@ -814,7 +814,7 @@ static int __init ns16550_uart_dt_init(struct dt_device_node *dev,return 0 ; } -static const char const *ns16550_dt_compat[]__initconst = +static const char *const ns16550_dt_compat[]__initconst = {"ns16550" ,"snps,dw-apb-uart" ,
xen/drivers/char/omap-uart.c +1 -1
@@ -353,7 +353,7 @@ static int __init omap_uart_init(struct dt_device_node *dev,return 0 ; } -static const char *const omap_uart_dt_compat[]__initdata = +static const char *const omap_uart_dt_compat[]__initconst = {"ti,omap4-uart" ,NULL
xen/drivers/char/pl011.c +1 -1
@@ -276,7 +276,7 @@ static int __init pl011_uart_init(struct dt_device_node *dev,return 0 ; } -static const char const *pl011_dt_compat[]__initdata = +static const char *const pl011_dt_compat[]__initconst = {"arm,pl011" ,NULL
Signature · 1 line
1.8.3.1
Quoted 7 lines · Julien Grall
The data type for DT compatible list should be:
const char * const[] __initconstFix every serial drivers which support device tree.
Spotted-by Jan Beulich <[email protected]>Signed-off-by Julien Grall <[email protected]>
Acked-by Ian Campbell <[email protected]>
WRT the release I think this is a bug fix.
Ian Campbell
AppliedQuoted 4 lines · Ian Campbell
Quoted 3 lines · Julien Grall
The data type for DT compatible list should be:
const char * const[] __initconst
Quoted 8 lines
Quoted 4 lines
Fix every serial drivers which support device tree.
Spotted-by Jan Beulich <[email protected]>Signed-off-by Julien Grall <[email protected]>Acked-by Ian Campbell <[email protected]>WRT the release I think this is a bug fix.
The risk here is a build error which will be easily detected, this patterns of const is used in all the existing non-serial DT drivers so I think we can be pretty confident in it.
Applied.