[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK7LNATbHBmu4a62rcBKmBR8eD=-pgUOW3mWh3PZtqOMPEpWJg@mail.gmail.com>
Date: Fri, 8 Feb 2019 18:33:33 +0900
From: Masahiro Yamada <yamada.masahiro@...ionext.com>
To: Joe Perches <joe@...ches.com>
Cc: linux-mtd <linux-mtd@...ts.infradead.org>,
Miquel Raynal <miquel.raynal@...tlin.com>,
Boris Brezillon <bbrezillon@...nel.org>,
Richard Weinberger <richard@....at>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Marek Vasut <marek.vasut@...il.com>,
Brian Norris <computersforpeace@...il.com>,
David Woodhouse <dwmw2@...radead.org>
Subject: Re: [PATCH 07/11] mtd: rawnand: denali: use bool type instead of int
where appropriate
On Fri, Feb 8, 2019 at 6:24 PM Joe Perches <joe@...ches.com> wrote:
>
> On Fri, 2019-02-08 at 17:08 +0900, Masahiro Yamada wrote:
> > Use 'bool' type for some function arguments.
> >
> > - write (write or read?)
> > - raw (the raw access mode or not?)
> >
> > It is true that denali_nand_info::dma_avail is also boolean, but
> > I am keeping it as 'int' because 'scripts/checkpatch --strict' would
> > report the following:
> >
> > CHECK: Avoid using bool structure members because of possible alignment issues
> > - see: https://lkml.org/lkml/2017/11/21/384
> >
> > I do not think it is a matter here, but I am sticking to the suggestion.
>
> just fyi: that suggestion has been removed by:
>
> commit 7967656ffbfa493f5546c0f18bf8a28f702c4baa
> Author: Jason Gunthorpe <jgg@...pe.ca>
> Date: Fri Jan 18 15:50:47 2019 -0700
>
> coding-style: Clarify the expectations around bool
>
> There has been some confusion since checkpatch started warning about bool
> use in structures, and people have been avoiding using it.
>
> Many people feel there is still a legitimate place for bool in structures,
> so provide some guidance on bool usage derived from the entire thread that
> spawned the checkpatch warning.
>
> Link: https://lkml.kernel.org/r/CA+55aFwVZk1OfB9T2v014PTAKFhtVan_Zj2dOjnCy3x
Thanks, this is good to know.
I will use 'bool' for denali_nand_info::dma_avail in v2.
I will wait for other comments until then.
--
Best Regards
Masahiro Yamada
Powered by blists - more mailing lists