[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190829170225.GA215901@architecture4>
Date: Fri, 30 Aug 2019 01:02:25 +0800
From: Gao Xiang <gaoxiang25@...wei.com>
To: Joe Perches <joe@...ches.com>
CC: Dan Carpenter <dan.carpenter@...cle.com>,
"devel@...verdev.osuosl.org" <devel@...verdev.osuosl.org>,
Sasha Levin <alexander.levin@...rosoft.com>,
Valdis Klētnieks <valdis.kletnieks@...edu>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Christoph Hellwig <hch@...radead.org>,
"linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>,
"OGAWA Hirofumi" <hirofumi@...l.parknet.co.jp>
Subject: Re: [PATCH] staging: exfat: add exfat filesystem code to staging
Hi Joe,
On Thu, Aug 29, 2019 at 09:59:21AM -0700, Joe Perches wrote:
> On Fri, 2019-08-30 at 00:44 +0800, Gao Xiang wrote:
> > Hi Dan,
> >
> > On Thu, Aug 29, 2019 at 11:43:46PM +0800, Dan Carpenter wrote:
> > > > p.s. There are 2947 (un)likely places in fs/ directory.
> > >
> > > I was complaining about you adding new pointless ones, not existing
> > > ones. The likely/unlikely annotations are supposed to be functional and
> > > not decorative. I explained this very clearly.
> > >
> > > Probably most of the annotations in fs/ are wrong but they are also
> > > harmless except for the slight messiness. However there are definitely
> > > some which are important so removing them all isn't a good idea.
> > >
> > > > If you like, I will delete them all.
> > >
> > > But for erofs, I don't think that any of the likely/unlikely calls have
> > > been thought about so I'm fine with removing all of them in one go.
> >
> > Anyway, I have removed them all in
> > https://lore.kernel.org/r/20190829163827.203274-1-gaoxiang25@huawei.com/
> >
> > Does it look good to you?
>
> Unrelated bikeshed from a trivial look:
>
> There's a block there that looks like:
>
> diff --git a/fs/erofs/data.c b/fs/erofs/data.c
> []
> @@ -70,7 +70,7 @@ struct page *__erofs_get_meta_page(struct super_block *sb,
> }
>
> err = bio_add_page(bio, page, PAGE_SIZE, 0);
> - if (unlikely(err != PAGE_SIZE)) {
> + if (err != PAGE_SIZE) {
> err = -EFAULT;
> goto err_out;
> }
>
> The initial assignment to err is odd as it's not
> actually an error value -E<FOO> but a int size
> from a unsigned int len.
>
> Here the return is either 0 or PAGE_SIZE.
>
> This would be more legible to me as:
>
> if (bio_add_page(bio, page, PAGE_SIZE, 0) != PAGE_SIZE) {
> err = -EFAULT;
> goto err_out;
> }
Okay, that is more reasonable, I will update the original patch as you suggested.
Thanks,
Gao Xiang
>
>
Powered by blists - more mailing lists