Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

c6x: kernel: setup: Remove 'const' for local variables in machine_init

early_init_dt_scan() accepts "void *", the related warning:

CC arch/c6x/kernel/setup.o
arch/c6x/kernel/setup.c: In function 'machine_init':
arch/c6x/kernel/setup.c:290:21: warning: passing argument 1 of 'early_init_dt_scan' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
early_init_dt_scan(fdt);
^
In file included from arch/c6x/kernel/setup.c:19:0:
include/linux/of_fdt.h:75:13: note: expected 'void *' but argument is of type 'const void *'
extern bool early_init_dt_scan(void *params);
^

Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
Signed-off-by: Mark Salter <msalter@redhat.com>

authored by

Chen Gang and committed by
Mark Salter
1a394e1a 1d2a64bd

+2 -2
+2 -2
arch/c6x/kernel/setup.c
··· 265 265 */ 266 266 notrace void __init machine_init(unsigned long dt_ptr) 267 267 { 268 - const void *dtb = __va(dt_ptr); 269 - const void *fdt = _fdt_start; 268 + void *dtb = __va(dt_ptr); 269 + void *fdt = _fdt_start; 270 270 271 271 /* interrupts must be masked */ 272 272 set_creg(IER, 2);