Re: [PATCH v2 2/7] erofs: some marcos are much more readable as a function

2019-08-30 Thread Gao Xiang
On Fri, Aug 30, 2019 at 11:52:23PM +0800, Gao Xiang wrote: > Hi Christoph, > > On Fri, Aug 30, 2019 at 08:45:51AM -0700, Christoph Hellwig wrote: > > On Thu, Aug 29, 2019 at 08:16:27PM -0700, Joe Perches wrote: > > > > - sizeof(__u32) * ((__count) - 1); }) > > > > +static inline

Re: [PATCH v2 2/7] erofs: some marcos are much more readable as a function

2019-08-30 Thread Gao Xiang
Hi Christoph, On Fri, Aug 30, 2019 at 08:45:51AM -0700, Christoph Hellwig wrote: > On Thu, Aug 29, 2019 at 08:16:27PM -0700, Joe Perches wrote: > > > - sizeof(__u32) * ((__count) - 1); }) > > > +static inline unsigned int erofs_xattr_ibody_size(__le16 d_icount) > > > +{ > > > + unsigned

Re: [PATCH v2 2/7] erofs: some marcos are much more readable as a function

2019-08-30 Thread Christoph Hellwig
On Thu, Aug 29, 2019 at 08:16:27PM -0700, Joe Perches wrote: > > - sizeof(__u32) * ((__count) - 1); }) > > +static inline unsigned int erofs_xattr_ibody_size(__le16 d_icount) > > +{ > > + unsigned int icount = le16_to_cpu(d_icount); > > + > > + if (!icount) > > + return 0;

Re: [PATCH v2 2/7] erofs: some marcos are much more readable as a function

2019-08-29 Thread Joe Perches
On Fri, 2019-08-30 at 11:00 +0800, Gao Xiang wrote: > As Christoph suggested [1], these marcos are much > more readable as a function s/marcos/macros/ . [] > diff --git a/fs/erofs/erofs_fs.h b/fs/erofs/erofs_fs.h [] > @@ -168,16 +168,24 @@ struct erofs_xattr_entry { > char e_name[0];

Re: [PATCH v2 2/7] erofs: some marcos are much more readable as a function

2019-08-29 Thread Gao Xiang
Hi Joe, On Thu, Aug 29, 2019 at 08:16:27PM -0700, Joe Perches wrote: > On Fri, 2019-08-30 at 11:00 +0800, Gao Xiang wrote: > > As Christoph suggested [1], these marcos are much > > more readable as a function > > s/marcos/macros/ > . > [] > > diff --git a/fs/erofs/erofs_fs.h

[PATCH v2 2/7] erofs: some marcos are much more readable as a function

2019-08-29 Thread Gao Xiang
As Christoph suggested [1], these marcos are much more readable as a function. [1] https://lore.kernel.org/r/20190829095954.gb20...@infradead.org/ Reported-by: Christoph Hellwig Signed-off-by: Gao Xiang --- v2: no change, just resend in case of dependency problem; fs/erofs/erofs_fs.h | 24