lkml.org 
[lkml]   [2023]   [Jan]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3] btrfs: use PAGE_{ALIGN, ALIGNED, ALIGN_DOWN} macro
On Tue, Jan 03, 2023 at 01:47:43PM +0800, Qu Wenruo wrote:
>
>
> On 2023/1/3 13:11, zys.zljxml@gmail.com wrote:
> > From: Yushan Zhou <katrinzhou@tencent.com>
> >
> > The header file linux/mm.h provides PAGE_ALIGN, PAGE_ALIGNED,
> > PAGE_ALIGN_DOWN macros. Use these macros to make code more
> > concise.
>
> Is there anything benefit from the change?
>
> In fact, PAGE_ALIGN()/PAGE_ALIGNED() is just using the same
> ALIGN()/IS_ALIGNED() macro.
>
> Thus I don't think your change is of any usefulness, not to mention it's
> going to introduce confusion and extra effort.
>
> I'm completely fine with regular ALIGN()/IS_ALIGNED() usage with PAGE_SIZE.

We already have PAGE_ALIGN in some places and I think it's a bit better
than the ALIGN/IS_ALIGN as it's clear that it's for a page.

\
 
 \ /
  Last update: 2023-03-26 23:36    [W:0.044 / U:0.348 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site