Re: [PATCH 06/11] ARM: davinci: constify gpio_led
From: Sekhar Nori
Date: Sat Dec 23 2017 - 05:03:47 EST
On Wednesday 20 December 2017 02:17 PM, Arvind Yadav wrote:
> gpio_led are not supposed to change at runtime.
> struct gpio_led_platform_data working with const gpio_led
> provided by <linux/leds.h>. So mark the non-const structs
> as const.
>
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@xxxxxxxxx>
This causes a new section mismatch warning
WARNING: vmlinux.o(.data+0x16d7c): Section mismatch in reference from the variable ntosd2_leds_data to the (unknown reference) .init.rodata:(unknown)
The variable ntosd2_leds_data references
the (unknown reference) __initconst (unknown)
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console
Thanks,
Sekhar