Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752589AbdGCG1N (ORCPT ); Mon, 3 Jul 2017 02:27:13 -0400 Received: from LGEAMRELO13.lge.com ([156.147.23.53]:53994 "EHLO lgeamrelo13.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751860AbdGCG1M (ORCPT ); Mon, 3 Jul 2017 02:27:12 -0400 X-Original-SENDERIP: 156.147.1.121 X-Original-MAILFROM: minchan@kernel.org X-Original-SENDERIP: 10.177.220.163 X-Original-MAILFROM: minchan@kernel.org Date: Mon, 3 Jul 2017 15:27:09 +0900 From: Minchan Kim To: Arvind Yadav , Andrew Morton Cc: ngupta@vflare.org, sergey.senozhatsky.work@gmail.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH] zram: constify attribute_group structures. Message-ID: <20170703062709.GA14258@bbox> References: <65680c1c4d85818f7094cbfa31c91bf28185ba1b.1499061182.git.arvind.yadav.cs@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <65680c1c4d85818f7094cbfa31c91bf28185ba1b.1499061182.git.arvind.yadav.cs@gmail.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 810 Lines: 25 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? 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.