Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751602AbdF2Bzj (ORCPT ); Wed, 28 Jun 2017 21:55:39 -0400 Received: from mail-oi0-f68.google.com ([209.85.218.68]:35869 "EHLO mail-oi0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751541AbdF2Bzb (ORCPT ); Wed, 28 Jun 2017 21:55:31 -0400 Reply-To: minyard@acm.org Subject: Re: [PATCH] char: ipmi: constify bmc_dev_attr_group and bmc_device_type To: Arvind Yadav Cc: openipmi-developer@lists.sourceforge.net, linux-kernel@vger.kernel.org References: From: Corey Minyard Message-ID: <7365910f-6ccd-832c-679b-7a19471c0802@acm.org> Date: Wed, 28 Jun 2017 20:55:27 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-GB Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1340 Lines: 41 Applied, thanks. -corey On 06/23/2017 12:13 AM, Arvind Yadav wrote: > File size before: > text data bss dec hex filename > 25678 1024 92 26794 68aa drivers/char/ipmi/ipmi_msghandler.o > > File size After adding 'const': > text data bss dec hex filename > 25806 896 92 26794 68aa drivers/char/ipmi/ipmi_msghandler.o > > Signed-off-by: Arvind Yadav > --- > drivers/char/ipmi/ipmi_msghandler.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c > index 9f69995..d60c05c 100644 > --- a/drivers/char/ipmi/ipmi_msghandler.c > +++ b/drivers/char/ipmi/ipmi_msghandler.c > @@ -2397,7 +2397,7 @@ static umode_t bmc_dev_attr_is_visible(struct kobject *kobj, > return mode; > } > > -static struct attribute_group bmc_dev_attr_group = { > +static const struct attribute_group bmc_dev_attr_group = { > .attrs = bmc_dev_attrs, > .is_visible = bmc_dev_attr_is_visible, > }; > @@ -2407,7 +2407,7 @@ static umode_t bmc_dev_attr_is_visible(struct kobject *kobj, > NULL > }; > > -static struct device_type bmc_device_type = { > +static const struct device_type bmc_device_type = { > .groups = bmc_dev_attr_groups, > }; >