Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752696AbdLYNH7 (ORCPT ); Mon, 25 Dec 2017 08:07:59 -0500 Received: from mail-pf0-f193.google.com ([209.85.192.193]:33456 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751681AbdLYNH5 (ORCPT ); Mon, 25 Dec 2017 08:07:57 -0500 X-Google-Smtp-Source: ACJfBouB/Ku67s/ZIMa2EDEq7YGD+h6cw1AOUx54+eXLJgrsROX6fIIXQGi2ZhUirVz+1nSHejEMXg== Subject: Re: [PATCH 00/11] constify gpio_led To: Russell King - ARM Linux References: <20171223101321.GQ10595@n2100.armlinux.org.uk> Cc: nsekhar@ti.com, khilman@kernel.org, kaloz@openwrt.org, khalasa@piap.pl, aaro.koskinen@iki.fi, tony@atomide.com, jason@lakedaemon.net, andrew@lunn.ch, sebastian.hesselbarth@gmail.com, gregory.clement@free-electrons.com, daniel@zonque.org, haojian.zhuang@gmail.com, robert.jarzmik@free.fr, marek.vasut@gmail.com, slapin@ossfans.org, jic23@cam.ac.uk, kgene@kernel.org, krzk@kernel.org, ralf@linux-mips.org, ysato@users.sourceforge.jp, dalias@libc.org, tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, linux-kernel@vger.kernel.org From: arvindY Message-ID: <5A40F824.5070100@gmail.com> Date: Mon, 25 Dec 2017 18:37:48 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <20171223101321.GQ10595@n2100.armlinux.org.uk> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 799 Lines: 19 Hi Ressell, On Saturday 23 December 2017 03:43 PM, Russell King - ARM Linux wrote: > 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 . 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. > Thanks for reviewing, As per your comment, I will send updated patch. Which will not include __initconst. ~arvind