From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753141AbdJGTah (ORCPT ); Sat, 7 Oct 2017 15:30:37 -0400 Received: from smtprelay0018.hostedemail.com ([216.40.44.18]:44081 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751421AbdJGTag (ORCPT ); Sat, 7 Oct 2017 15:30:36 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::,RULES_HIT:41:355:379:541:599:800:960:973:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1540:1593:1594:1711:1730:1747:1777:1792:1963:2393:2553:2559:2562:2828:3138:3139:3140:3141:3142:3352:3622:3865:3867:3868:3870:3871:3872:3874:4321:4605:5007:7903:10004:10400:10848:11026:11232:11473:11658:11914:12740:12760:12895:13069:13161:13229:13311:13357:13439:14181:14659:14721:21080:21611:21627:30012:30054:30070:30090:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:2,LUA_SUMMARY:none X-HE-Tag: car05_5c3f3e518cf4b X-Filterd-Recvd-Size: 2002 Message-ID: <1507404632.27502.5.camel@perches.com> Subject: Re: [f2fs-dev] [PATCH] f2fs: Fix bool initialization/comparison From: Joe Perches To: Ju Hyung Park , Thomas Meyer Cc: "jaegeuk@kernel.org" , Chao Yu , linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org Date: Sat, 07 Oct 2017 12:30:32 -0700 In-Reply-To: References: <1507383097081-778026979-0-diffsplit-thomas@m3y3r.de> <1507383097084-400953728-9-diffsplit-thomas@m3y3r.de> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.22.6-1ubuntu1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. > 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 */ > > - 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.