From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753826AbdJIBsi (ORCPT ); Sun, 8 Oct 2017 21:48:38 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:7519 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753704AbdJIBsh (ORCPT ); Sun, 8 Oct 2017 21:48:37 -0400 Subject: Re: [f2fs-dev] [PATCH] f2fs: Fix bool initialization/comparison To: Joe Perches , Ju Hyung Park , Thomas Meyer CC: "jaegeuk@kernel.org" , , References: <1507383097081-778026979-0-diffsplit-thomas@m3y3r.de> <1507383097084-400953728-9-diffsplit-thomas@m3y3r.de> <1507404632.27502.5.camel@perches.com> From: Chao Yu Message-ID: Date: Mon, 9 Oct 2017 09:48:24 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <1507404632.27502.5.camel@perches.com> Content-Type: text/plain; charset="windows-1252" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.134.22.195] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020206.59DAD56F.0033,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 82a654436df802df6856a233bfae7c3d Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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. > > > . >