Commit 1a394e1a authored by Chen Gang's avatar Chen Gang Committed by Mark Salter

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: default avatarChen Gang <gang.chen.5i5j@gmail.com>
Signed-off-by: default avatarMark Salter <msalter@redhat.com>
parent 1d2a64bd
......@@ -265,8 +265,8 @@ int __init c6x_add_memory(phys_addr_t start, unsigned long size)
*/
notrace void __init machine_init(unsigned long dt_ptr)
{
const void *dtb = __va(dt_ptr);
const void *fdt = _fdt_start;
void *dtb = __va(dt_ptr);
void *fdt = _fdt_start;
/* interrupts must be masked */
set_creg(IER, 2);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment