Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752102AbdHDT6S (ORCPT ); Fri, 4 Aug 2017 15:58:18 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:36840 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751268AbdHDT6Q (ORCPT ); Fri, 4 Aug 2017 15:58:16 -0400 Subject: Re: [PATCH] leds: blinkm: constify attribute_group structures. To: Arvind Yadav , jansimon.moeller@gmx.de, rpurdie@rpsys.net, pavel@ucw.cz References: <7f7a15506ee3ccb8d2d54e3f3209f5cd1105f031.1501827866.git.arvind.yadav.cs@gmail.com> Cc: linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org From: Jacek Anaszewski Message-ID: Date: Fri, 4 Aug 2017 21:57:33 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <7f7a15506ee3ccb8d2d54e3f3209f5cd1105f031.1501827866.git.arvind.yadav.cs@gmail.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 983 Lines: 34 Hi Arvind, Thanks for the patch. On 08/04/2017 08:25 AM, Arvind Yadav wrote: > attribute_group are not supposed to change at runtime. All functions > working with attribute_group provided by work with > const attribute_group. So mark the non-const structs as const. > > Signed-off-by: Arvind Yadav > --- > drivers/leds/leds-blinkm.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/leds/leds-blinkm.c b/drivers/leds/leds-blinkm.c > index 617fe97..d03ed6b 100644 > --- a/drivers/leds/leds-blinkm.c > +++ b/drivers/leds/leds-blinkm.c > @@ -298,7 +298,7 @@ static ssize_t store_test(struct device *dev, struct device_attribute *attr, > NULL, > }; > > -static struct attribute_group blinkm_group = { > +static const struct attribute_group blinkm_group = { > .name = "blinkm", > .attrs = blinkm_attrs, > }; > Applied to the for-next branch of linux-leds.git. -- Best regards, Jacek Anaszewski