Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752154AbWCPK3R (ORCPT ); Thu, 16 Mar 2006 05:29:17 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752168AbWCPK3R (ORCPT ); Thu, 16 Mar 2006 05:29:17 -0500 Received: from ppsw-9.csi.cam.ac.uk ([131.111.8.139]:42668 "EHLO ppsw-9.csi.cam.ac.uk") by vger.kernel.org with ESMTP id S1752154AbWCPK3Q (ORCPT ); Thu, 16 Mar 2006 05:29:16 -0500 X-Cam-SpamDetails: Not scanned X-Cam-AntiVirus: No virus found X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Date: Thu, 16 Mar 2006 10:28:38 +0000 (GMT) From: Anton Altaparmakov To: akpm@osdl.org cc: linux-kernel@vger.kernel.org, len.brown@intel.com Subject: Re: [patch 1/1] consolidate TRUE and FALSE In-Reply-To: <200603161004.k2GA46Fc029649@shell0.pdx.osdl.net> Message-ID: References: <200603161004.k2GA46Fc029649@shell0.pdx.osdl.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1561 Lines: 54 Hi, On Thu, 16 Mar 2006, akpm@osdl.org wrote: > From: Andrew Morton > > We have no less than 65 implementations of TRUE and FALSE in the tree, so the > inevitable happened: [snip > > The patch implements TRUE and FALSE in include/linux/kernel.h and removes all > the private versions. Great! That has really been long overdue. > Various places are doing things like > > typedef { > FALSE, > TRUE > } my_fave_name_for_a_bool; > > These are converted to > > typedef int my_fave_name_for_a_bool; Given that the kernel now requires gcc 3.2 or later, that already includes a native boolean type (_Bool)? Why not use that instead of "int"? Also contains: #define bool _Bool #define true 1 #define false 0 So we could take the bool rather than _Bool, too given _Bool looks rather ugly... We could even go as far as removing all those typedefs and replacing all their uses with the native boolean type (or the "bool" define or whatever). Seems like the perfect janitorial task to me. (-; Best regards, Anton -- Anton Altaparmakov (replace at with @) Unix Support, Computing Service, University of Cambridge, CB2 3QH, UK Linux NTFS maintainer / IRC: #ntfs on irc.freenode.net WWW: http://linux-ntfs.sf.net/ & http://www-stu.christs.cam.ac.uk/~aia21/ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/