[lkml]   [2017]   [Dec]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 00/11] constify gpio_led
On Wed, Dec 20, 2017 at 02:17:41PM +0530, 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.

Marking the structs as const is fine, but marking them __initconst is
not. The GPIO LED driver can be built as a module, which means it can
be loaded after the init sections have gone away. If that happens,
then we de-reference the pointer to memory that has been freed.

Please re-spin your patch set without the __initconst marking.

RMK's Patch system:
FTTC broadband for 0.8mile line in suburbia: sync at 8.8Mbps down 630kbps up
According to 8.21Mbps down 510kbps up

 \ /
  Last update: 2017-12-23 11:14    [W:0.117 / U:1.480 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site