From: Doug Ledford <dledford@redhat.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: James Bottomley <James.Bottomley@SteelEye.com>,
ricknu-0@student.ltu.se, linux-kernel@vger.kernel.org,
linux-scsi@vger.kernel.org
Subject: Re: [PATCH] drivers/scsi/aic7xxx_old: Convert to generic boolean-values
Date: Fri, 16 Feb 2007 16:43:04 -0500 [thread overview]
Message-ID: <1171662184.3161.245.camel@fc6.xsintricity.com> (raw)
In-Reply-To: <20070216105026.7bd17a79.akpm@linux-foundation.org>
[-- Attachment #1: Type: text/plain, Size: 1999 bytes --]
On Fri, 2007-02-16 at 10:50 -0800, Andrew Morton wrote:
> Me no understand.
>
> If you take the specific example of
>
> void
> ahd_set_syncrate(struct ahd_softc *ahd, struct ahd_devinfo *devinfo,
> u_int period, u_int offset, u_int ppr_options,
> u_int type, int paused)
>
> then if is crufty, inappropriate and wrong that `paused' is a scalar type.
Although you picked a code segment out of the modern aic7xxx, there is a
matching similar one in aic7xxx_old. Now, in all fairness, I was at one
point playing with a much more preemptable model for that driver that
allowed nested pauses, at which point the value of pause would have made
sense to be scalar, but that was a *long* time ago.
>
> It's just not true or sensible that the code is written so that `paused'
> can take a value of seventy eight. It _is_ a boolean. It is a truth
> value. Declaring it as such in the source is all goodness. Passing the
> value `true' into calls to this function improve readability over passing
> "1".
Hence the reason for the original upper case TRUE/FALSE. I have to
admit, I don't really like the lower case true/false, it looks like a
variable that can be assigned, thereby changing the implementation of
the function call when in fact each calling location is hard coding a
constant. But, that's just me and my crufty old C that differentiates
between hard coded things and variables via case.
> So I don't agree with (or understand) your objections. But I can certainly
> understand reluctance to merge a large-but-minor, do-nothing-much patch into
> a large and not-very-maintained driver.
Hehehe...and here I was thinking of factoring that thing into files and
actually bringing it into the current century.
--
Doug Ledford <dledford@redhat.com>
GPG KeyID: CFBFF194
http://people.redhat.com/dledford
Infiniband specific RPMs available at
http://people.redhat.com/dledford/Infiniband
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
prev parent reply other threads:[~2007-02-16 21:45 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-10 17:46 Richard Knutsson
2007-02-10 18:27 ` James Bottomley
2007-02-10 20:35 ` Richard Knutsson
2007-02-10 20:43 ` Richard Knutsson
2007-02-12 20:27 ` Andrew Morton
2007-02-16 16:42 ` James Bottomley
2007-02-16 18:04 ` Richard Knutsson
2007-02-16 18:23 ` James Bottomley
2007-02-16 19:10 ` Richard Knutsson
2007-02-16 18:34 ` Andrew Morton
2007-02-16 18:42 ` James Bottomley
2007-02-16 18:50 ` Andrew Morton
2007-02-16 21:43 ` Doug Ledford [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1171662184.3161.245.camel@fc6.xsintricity.com \
--to=dledford@redhat.com \
--cc=James.Bottomley@SteelEye.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=ricknu-0@student.ltu.se \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®