mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chao Yu <yuchao0@huawei.com>
To: Joe Perches <joe@perches.com>,
	Ju Hyung Park <qkrwngud825@gmail.com>,
	Thomas Meyer <thomas@m3y3r.de>
Cc: "jaegeuk@kernel.org" <jaegeuk@kernel.org>,
	<linux-f2fs-devel@lists.sourceforge.net>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [f2fs-dev] [PATCH] f2fs: Fix bool initialization/comparison
Date: Mon, 9 Oct 2017 09:48:24 +0800	[thread overview]
Message-ID: <ca988eaa-74aa-8677-a879-11f4edf1039a@huawei.com> (raw)
In-Reply-To: <1507404632.27502.5.camel@perches.com>

On 2017/10/8 3:30, Joe Perches wrote:
> On Sat, 2017-10-07 at 23:33 +0900, Ju Hyung Park wrote:
>> 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.
> 
> Bogus?  Well, not really.  It's just a neatening and it's
> identical object code.
> 
> The idea is that true/false is more intelligible than 1/0
> for a human reader.

Yes, that's just cleanup.

Hi Thomas, could you change the commit message a bit?

> 
>> On Sat, Oct 7, 2017 at 11:02 PM, Thomas Meyer <thomas@m3y3r.de> wrote:
>>> Bool initializations should use true and false. Bool tests don't need
>>> comparisons.
> []
>>> diff -u -p 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 */

Comment should be updated too.

Thanks,

>>> -       fio->submitted = 1;
>>> +       fio->submitted = true;
>>>
>>>         inc_page_count(sbi, WB_DATA_TYPE(bio_page));
>>>
> 
> And it's probably better to change the comment too.
> 
> 
> .
> 

  reply	other threads:[~2017-10-09  1:48 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-07 14:02 Cocci spatch "boolinit" - v4.14-rc1 Thomas Meyer
2017-10-07 14:02 ` [PATCH] exofs: Fix bool initialization/comparison Thomas Meyer
2017-10-07 14:02 ` [PATCH] f2fs: " Thomas Meyer
2017-10-07 14:33   ` [f2fs-dev] " Ju Hyung Park
2017-10-07 19:30     ` Joe Perches
2017-10-09  1:48       ` Chao Yu [this message]
2017-10-10 17:41         ` Jaegeuk Kim
2017-10-07 14:02 ` [PATCH] ext4: " Thomas Meyer
2017-10-07 14:02 ` [PATCH] bfq: " Thomas Meyer
2017-10-07 14:02 ` [PATCH] apparmor: " Thomas Meyer
2017-10-07 17:18   ` John Johansen
2017-10-07 14:02 ` [PATCH] cifs: " Thomas Meyer
2017-10-10  1:14   ` Nico Kadel-Garcia
2017-10-07 14:02 ` [PATCH] NFS: " Thomas Meyer
2017-10-07 14:02 ` [PATCH] ceph: " Thomas Meyer
2017-10-09  1:52   ` Yan, Zheng
2017-10-07 14:02 ` [PATCH] afs: " Thomas Meyer
2017-10-07 14:02 ` [PATCH] nfsd: " Thomas Meyer
2017-10-07 14:02 ` [PATCH] ima: " Thomas Meyer
2017-10-07 14:02 ` [PATCH] pstore: " Thomas Meyer
2018-11-29 23:21   ` Kees Cook
2017-10-07 14:02 ` [PATCH] configfs: " Thomas Meyer
2017-10-19 14:08   ` Christoph Hellwig
2017-10-07 14:02 ` [PATCH] xfs: " Thomas Meyer
2017-10-09 14:24   ` Brian Foster
2017-10-07 14:02 ` [PATCH] btrfs: " Thomas Meyer
2017-10-09 16:05   ` David Sterba
2017-10-07 14:02 ` [PATCH] proc: " Thomas Meyer
2017-10-07 14:02 ` [PATCH] selinux: " Thomas Meyer
2017-10-10 23:17   ` Casey Schaufler
2017-10-10 23:19   ` Casey Schaufler
2017-10-13 22:40     ` Paul Moore
2017-10-10 15:19 ` [PATCH] afs: " David Howells

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ca988eaa-74aa-8677-a879-11f4edf1039a@huawei.com \
    --to=yuchao0@huawei.com \
    --cc=jaegeuk@kernel.org \
    --cc=joe@perches.com \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=qkrwngud825@gmail.com \
    --cc=thomas@m3y3r.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®