Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752421AbdHNUsR (ORCPT ); Mon, 14 Aug 2017 16:48:17 -0400 Received: from mail-wr0-f193.google.com ([209.85.128.193]:37154 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751588AbdHNUsQ (ORCPT ); Mon, 14 Aug 2017 16:48:16 -0400 Subject: Re: [PATCH 1/2] leds: blinkm: constify attribute_group structure To: Amitoj Kaur Chawla , rpurdie@rpsys.net, pavel@ucw.cz, linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org References: <20170810162802.GA6881@amitoj-Inspiron-3542> From: Jacek Anaszewski Message-ID: <29cfc396-027f-9460-afea-a701ae76a78e@gmail.com> Date: Mon, 14 Aug 2017 22:47:32 +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: <20170810162802.GA6881@amitoj-Inspiron-3542> 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: 1271 Lines: 42 Hi Amitoj, Similar patch is already queued in the for-next branch of linux-leds.git. Thanks, Jacek Anaszewski On 08/10/2017 06:28 PM, Amitoj Kaur Chawla wrote: > Functions working with attribute_groups provided by > work with const attribute_group. These attribute_group structures do not > change at runtime so mark them as const. > > File size before: > text data bss dec hex filename > 8657 3496 64 12217 2fb9 drivers/leds/leds-blinkm.o > > File size after: > text data bss dec hex filename > 8753 3400 64 12217 2fb9 drivers/leds/leds-blinkm.o > > This change was made with the help of Coccinelle. > > Signed-off-by: Amitoj Kaur Chawla > --- > 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 struct attribute *blinkm_attrs[] = { > NULL, > }; > > -static struct attribute_group blinkm_group = { > +static const struct attribute_group blinkm_group = { > .name = "blinkm", > .attrs = blinkm_attrs, > }; >