All of lore.kernel.org
 help / color / mirror / Atom feed
From: Minchan Kim <minchan@kernel.org>
To: Arvind Yadav <arvind.yadav.cs@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: ngupta@vflare.org, sergey.senozhatsky.work@gmail.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] zram: constify attribute_group structures.
Date: Mon, 3 Jul 2017 15:27:09 +0900	[thread overview]
Message-ID: <20170703062709.GA14258@bbox> (raw)
In-Reply-To: <65680c1c4d85818f7094cbfa31c91bf28185ba1b.1499061182.git.arvind.yadav.cs@gmail.com>

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 <linux/sysfs.h> 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 <arvind.yadav.cs@gmail.com>
Acked-by: Minchan Kim <minchan@kernel.org>

Thanks.

  reply	other threads:[~2017-07-03  6:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-03  6:13 [PATCH] zram: constify attribute_group structures Arvind Yadav
2017-07-03  6:27 ` Minchan Kim [this message]
2017-07-03  7:18   ` Arvind Yadav
2017-07-03  9:00 ` Sergey Senozhatsky
2017-07-03 10:30   ` Arvind Yadav
2017-07-03 12:04     ` Sergey Senozhatsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170703062709.GA14258@bbox \
    --to=minchan@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=arvind.yadav.cs@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ngupta@vflare.org \
    --cc=sergey.senozhatsky.work@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.