Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754016AbdGCKRW (ORCPT ); Mon, 3 Jul 2017 06:17:22 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:54674 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753015AbdGCKRR (ORCPT ); Mon, 3 Jul 2017 06:17:17 -0400 X-AuditID: b6c32a39-f794b6d000001a4c-1a-595a19aaa11b MIME-version: 1.0 Content-transfer-encoding: 8BIT Content-type: text/plain; charset="UTF-8" Message-id: <595A19AA.3060105@samsung.com> Date: Mon, 03 Jul 2017 19:17:14 +0900 From: Chanwoo Choi Organization: Samsung Electronics User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 To: Arvind Yadav , myungjoo.ham@samsung.com, kyungmin.park@samsung.com Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] PM / devfreq: constify attribute_group structures. In-reply-to: X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrHKsWRmVeSWpSXmKPExsWy7bCmvu4qyahIgz8ftS2u9S5ktjjb9Ibd 4vKuOWwWn3uPMFrcblzB5sDqsXPWXXaPvi2rGD0+b5ILYI5KtclITUxJLVJIzUvOT8nMS7dV 8g6Od443NTMw1DW0tDBXUshLzE21VXLxCdB1y8wBWqmkUJaYUwoUCkgsLlbSt7Mpyi8tSVXI yC8usVWKNjQ00jM0MNczMjLSMzGOtTIyBSpJSM04NmENW8Fk7oq3n26wNTDe5Ohi5OSQEDCR 6DzVzgJhi0lcuLeerYuRi0NIYAejxKY1p6Ccz4wSm0/sYO9i5ADrONulAhFfyyjRcXMaE0g3 r4CgxI/J91hAapgF5CWOXMoGCTMLaEps3b2eHaL+HqPEmR1TmSHqtSQmdy9nBLFZBFQlXm5o BYuzAcX3v7jBBmLzCyhKXP3xGKxGVCBCYuf8b2A3iAgkS7TN0oSYbyXx+mM3O4g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y38H44+z0YcY BTgYlXh4XxRHRgqxJpYVV+YeYpTgYFYS4V0jHhUpxJuSWFmVWpQfX1Sak1p8iNEU6LmJzFKi yfnAaM4riTc0sTQyMTAzMzQyMDZTEuedEPglQkggPbEkNTs1tSC1CKaPiYNTqoHRfT7nDV0B +6+Mh3LNdt0UNmE9vzosVkB5/XKrCouAvvWv9i5ImPP70I1HH68t2ngleI6j607L1/dsvHpL J7xYNnf1vYnxT+JSrt/vmPybg60o2aavICG1KPDX1iDbU2wf152zcym2DVoWwp/LUibiEvuw muFDiTxrvmeey/sjx9TvXD+27kejEktxRqKhFnNRcSIA6Xlagq4CAAA= X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20170703101714epcas1p3770932ae4532215f56ddf9c9a2e6ef71 X-Msg-Generator: CA X-Sender-IP: 182.195.42.79 X-Local-Sender: =?UTF-8?B?7LWc7LCs7JqwG1RpemVuIFBsYXRmb3JtIExhYihTL1fshLw=?= =?UTF-8?B?7YSwKRvsgrzshLHsoITsnpAbU2VuaW9yIEVuZ2luZWVy?= X-Global-Sender: =?UTF-8?B?Q2hhbndvbyBDaG9pG1RpemVuIFBsYXRmb3JtIExhYi4bU2Ft?= =?UTF-8?B?c3VuZyBFbGVjdHJvbmljcxtTZW5pb3IgRW5naW5lZXI=?= X-Sender-Code: =?UTF-8?B?QzEwG1RFTEUbQzEwVjgxMTE=?= CMS-TYPE: 101P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20170703101025epcas4p151a0c496ae3410031c27f4da7ab9714f X-RootMTR: 20170703101025epcas4p151a0c496ae3410031c27f4da7ab9714f References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1387 Lines: 40 On 2017년 07월 03일 19:10, Arvind Yadav wrote: > attribute_groups are not supposed to change at runtime. All functions > working with attribute_groups provided by work with const > attribute_group. So mark the non-const structs as const. > > File size before: > text data bss dec hex filename > 621 176 0 797 31d drivers/devfreq/governor_userspace.o > > File size After adding 'const': > text data bss dec hex filename > 670 144 0 814 32e drivers/devfreq/governor_userspace.o > > Signed-off-by: Arvind Yadav > --- > drivers/devfreq/governor_userspace.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/devfreq/governor_userspace.c b/drivers/devfreq/governor_userspace.c > index 1769760..77028c2 100644 > --- a/drivers/devfreq/governor_userspace.c > +++ b/drivers/devfreq/governor_userspace.c > @@ -86,7 +86,7 @@ static ssize_t show_freq(struct device *dev, struct device_attribute *attr, > &dev_attr_set_freq.attr, > NULL, > }; > -static struct attribute_group dev_attr_group = { > +static const struct attribute_group dev_attr_group = { > .name = "userspace", > .attrs = dev_entries, > }; > Looks good to me. Reviewed-by: Chanwoo Choi -- Best Regards, Chanwoo Choi Samsung Electronics