lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1171651347.3443.45.camel@mulgrave.il.steeleye.com>
Date:	Fri, 16 Feb 2007 12:42:27 -0600
From:	James Bottomley <James.Bottomley@...elEye.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	ricknu-0@...dent.ltu.se, linux-kernel@...r.kernel.org,
	linux-scsi@...r.kernel.org
Subject: Re: [PATCH] drivers/scsi/aic7xxx_old: Convert to generic
	boolean-values

On Fri, 2007-02-16 at 10:34 -0800, Andrew Morton wrote:
> On Fri, 16 Feb 2007 10:42:12 -0600 James Bottomley <James.Bottomley@...elEye.com> wrote:
> 
> > On Mon, 2007-02-12 at 12:27 -0800, Andrew Morton wrote:
> > > Given that we now have a standard kernel-wide, c99-friendly way of
> > > expressing true and false, I'd suggest that this decision can be revisited.
> > > 
> > > Because a "true" is significantly more meaningful (and hence readable)
> > > thing than a bare "1".
> > 
> > OK, I'm really not happy with doing this for three reasons:
> > 
> > 1. It's inviting huge amounts of driver churn changing bitfields to
> > booleans
> > 
> > 2. I do find it to be a readability issue.  Like most driver writers,
> > I'm used to register layouts, and those are simple bitfields, so I don't
> > tend to think true and false, I think 1 and 0.
> > 
> > 3. Having a different, special, type for single bit bitfields (while
> > still using u<n> for multi bit bitfields) is asking for confusion, and
> > hence trouble at the driver level.
> > 
> 
> Confused.  The patch changes TRUE to true and FALSE to false.  The code
> wasn't using bitfields before and isn't using them afterwards.  I wouldn't
> expect there to be any change in generated code.

Sorry, I was addressing the general idea of using booleans in drivers.

> All it's doing is replacing the driver's private TRUE/FALSE with the
> kernel-wide ones.

I already addressed that one ... I prefer bare 0 and 1.  However, if the
driver writer wants to use TRUE/FALSE, I won't specifically reject it.
I really don't like the lower case true/false.

James


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ