From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751276AbWGWThD (ORCPT ); Sun, 23 Jul 2006 15:37:03 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751279AbWGWThD (ORCPT ); Sun, 23 Jul 2006 15:37:03 -0400 Received: from gepetto.dc.ltu.se ([130.240.42.40]:51431 "EHLO gepetto.dc.ltu.se") by vger.kernel.org with ESMTP id S1751276AbWGWThB (ORCPT ); Sun, 23 Jul 2006 15:37:01 -0400 Message-ID: <1153683377.44c3cfb146443@portal.student.luth.se> Date: Sun, 23 Jul 2006 21:36:17 +0200 From: ricknu-0@student.ltu.se To: Jan Engelhardt Cc: linux-kernel@vger.kernel.org, Andrew Morton , Jeff Garzik , Alexey Dobriyan , Vadim Lobanov , Shorty Porty , Peter Williams , Michael Buesch , Pekka Enberg , Stefan Richter , larsbj@gullik.net Subject: Re: [RFC][PATCH] A generic boolean (version 4) References: <1153341500.44be983ca1407@portal.student.luth.se> <1153669750.44c39a7607a30@portal.student.luth.se> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT User-Agent: Internet Messaging Program (IMP) 3.1 X-Originating-IP: 130.240.42.170 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Citerar Jan Engelhardt : > > >Hopefully it is now ready for a "real" patch, whom adds bool to all > >arches. If there is no comments on this one, it will be sent about > >tomorrow night (GMT). > > --- a/drivers/block/DAC960.h > +++ b/drivers/block/DAC960.h > @@ -71,7 +71,7 @@ #define DAC690_V2_PciDmaMask 0xfffffffff > Define a Boolean data type. > */ > > -typedef enum { false, true } __attribute__ ((packed)) boolean; > +typedef bool boolean; > > > /* > > Looks good. (I know found out what this is good for. Eventually, all > booleans > in the source of DAC960 et al. should be changed to just 'bool' but that's > another patch's job.) Yepp :) > Looks good, except for the "all arches" thing. You only seem to add it > to i386: I said: 'ready for a "real" patch', meaning it will be in another patch. Will try to be more clear in the future. > >+#undef false > >+#undef true > >+ > >+enum { > >+ false = 0, > >+ true = 1 > >+}; > >+ > >+#define false false > >+#define true true > > Can someone please tell me what advantage 'define true true' is going to > bring, besides than being able to '#ifdef true'? Assembly-code can not use enum but #define. That is the reason I find but there might be more. > Jan Engelhardt /Richard Knutsson