Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752736AbdGCHSw (ORCPT ); Mon, 3 Jul 2017 03:18:52 -0400 Received: from mail-io0-f195.google.com ([209.85.223.195]:35341 "EHLO mail-io0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752718AbdGCHSs (ORCPT ); Mon, 3 Jul 2017 03:18:48 -0400 Subject: Re: [PATCH] zram: constify attribute_group structures. To: Minchan Kim , Andrew Morton References: <65680c1c4d85818f7094cbfa31c91bf28185ba1b.1499061182.git.arvind.yadav.cs@gmail.com> <20170703062709.GA14258@bbox> Cc: ngupta@vflare.org, sergey.senozhatsky.work@gmail.com, linux-kernel@vger.kernel.org From: Arvind Yadav Message-ID: <89a0004e-89dc-7d06-7b5b-091677074a8c@gmail.com> Date: Mon, 3 Jul 2017 12:48:32 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <20170703062709.GA14258@bbox> 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: 963 Lines: 30 Hi, On Monday 03 July 2017 11:57 AM, Minchan Kim wrote: > Hello, > > On Mon, Jul 03, 2017 at 11:43:13AM +0530, 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. > If so, how about changing all of places where not have used const > as well as zram? Sure, I am going to change other place also. > > Anyway, I'm okay with this. > >> File size before: >> text data bss dec hex filename >> 8293 841 4 9138 23b2 drivers/block/zram/zram_drv.o >> >> File size After adding 'const': >> text data bss dec hex filename >> 8357 777 4 9138 23b2 drivers/block/zram/zram_drv.o >> >> Signed-off-by: Arvind Yadav > Acked-by: Minchan Kim > > Thanks. Thanks, ~arvind