All of lore.kernel.org
 help / color / mirror / Atom feed
From: Qu Wenruo <quwenruo@cn.fujitsu.com>
To: <dsterba@suse.cz>, <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH 2/2] btrfs-progs: convert: Make btrfs_reserved_ranges const
Date: Fri, 17 Mar 2017 08:35:01 +0800	[thread overview]
Message-ID: <5c30fbd8-d9e5-b03f-4d0c-6ad7a7dd33cd@cn.fujitsu.com> (raw)
In-Reply-To: <20170316163325.GL14605@twin.jikos.cz>



At 03/17/2017 12:33 AM, David Sterba wrote:
> On Thu, Mar 16, 2017 at 11:18:31AM +0800, Qu Wenruo wrote:
>> Since btrfs_reserved_ranges array is just used to store btrfs reserved
>> ranges, no one will nor should modify them at run time, make them static
>> and const will be better.
>>
>> This also eliminates the use of immediate number 3.
>
> Adding const is fine, but you shouldn't define the structure inside
> header, even as static.

Any reason why we shouldn't define const static array in header?

Is extra .text segments usage the problem?

Thanks,
Qu

> The number 3 needs to stay so we can use
> ARRAY_SIZE.
>
>



  reply	other threads:[~2017-03-17  0:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-16  3:18 [PATCH 1/2] btrfs-progs: kerncompat: Fix re-definition of __bitwise Qu Wenruo
2017-03-16  3:18 ` [PATCH 2/2] btrfs-progs: convert: Make btrfs_reserved_ranges const Qu Wenruo
2017-03-16 16:33   ` David Sterba
2017-03-17  0:35     ` Qu Wenruo [this message]
2017-03-27 13:39       ` David Sterba
2017-03-27 17:37 ` [PATCH 1/2] btrfs-progs: kerncompat: Fix re-definition of __bitwise David Sterba

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=5c30fbd8-d9e5-b03f-4d0c-6ad7a7dd33cd@cn.fujitsu.com \
    --to=quwenruo@cn.fujitsu.com \
    --cc=dsterba@suse.cz \
    --cc=linux-btrfs@vger.kernel.org \
    /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.