[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAD14+f2qcTmYa066cNFOkSycsAHaCcc+q_63U75Jv=0y49_YhA@mail.gmail.com>
Date: Sat, 7 Oct 2017 23:33:54 +0900
From: Ju Hyung Park <qkrwngud825@...il.com>
To: Thomas Meyer <thomas@...3r.de>
Cc: "jaegeuk@...nel.org" <jaegeuk@...nel.org>,
Chao Yu <yuchao0@...wei.com>,
linux-f2fs-devel@...ts.sourceforge.net,
linux-kernel@...r.kernel.org
Subject: Re: [f2fs-dev] [PATCH] f2fs: Fix bool initialization/comparison
Isn't this bogus?
"bool" type in Linux kernel is a typedef to "_Bool"
and true/false is defined as 1 and 0 by enum at include/linux/stddef.h.
On Sat, Oct 7, 2017 at 11:02 PM, Thomas Meyer <thomas@...3r.de> wrote:
> Bool initializations should use true and false. Bool tests don't need
> comparisons.
>
> Signed-off-by: Thomas Meyer <thomas@...3r.de>
> ---
>
> diff -u -p a/fs/f2fs/data.c b/fs/f2fs/data.c
> --- a/fs/f2fs/data.c
> +++ b/fs/f2fs/data.c
> @@ -419,7 +419,7 @@ next:
> bio_page = fio->encrypted_page ? fio->encrypted_page : fio->page;
>
> /* set submitted = 1 as a return value */
> - fio->submitted = 1;
> + fio->submitted = true;
>
> inc_page_count(sbi, WB_DATA_TYPE(bio_page));
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Linux-f2fs-devel mailing list
> Linux-f2fs-devel@...ts.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
Powered by blists - more mailing lists