Re: [PATCH 2/2] btrfs-progs: convert: Make btrfs_reserved_ranges const

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





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.




--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux