Re: [PATCH] Btrfs: use linux/sizes.h to represent constants

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

 



On Tue, Dec 15, 2015 at 01:42:10AM +0900, Byongho Lee wrote:
> We use many constants to represent size and offset value.  And to make
> code readable we use '256 * 1024 * 1024' instead of '268435456' to
> represent '256MB'.  However we can make far more readable with 'SZ_256MB'
> which is defined in the 'linux/sizes.h'.
> 
> So this patch replaces 'xxx * 1024 * 1024' kind of expression with
> single 'SZ_xxxMB' if 'xxx' is a power of 2 then 'xxx * SZ_1M' if 'xxx' is
> not a power of 2. And I haven't touched to '4096' & '8192' because it's
> more intuitive than 'SZ_4KB' & 'SZ_8KB'.
> 
> Signed-off-by: Byongho Lee <bhlee.kernel@xxxxxxxxx>

Reviewed-by: David Sterba <dsterba@xxxxxxxx>
--
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