From: Andrew Morton <akpm@linux-foundation.org>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: torvalds@linux-foundation.org, linux-kernel@vger.kernel.org,
vvscore@gmail.com
Subject: Re: [PATCH] 8250: Fix oops from setserial
Date: Sat, 30 May 2009 11:50:24 -0700 [thread overview]
Message-ID: <20090530115024.04850195.akpm@linux-foundation.org> (raw)
In-Reply-To: <20090530114632.7f101b9a@lxorguk.ukuu.org.uk>
On Sat, 30 May 2009 11:46:32 +0100 Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
> > Sure, huge numbers of drivers use the cast.
> >
> > But I've never seen past sinnings as being a reason to continue sinning.
> > Doing new code the right way doesn't result in worse code, and reduces
> > the chances of someone copying and pasting the wrong way.
>
> As I said please read the rest of the driver.
I'm not the reading-averse one here :(
> It would ridiculous to have
> one dereference done differently to the rest in several thousand lines of
> code.
Actually, it would be typical. Many many drivers which originally did
something consistently wrong have, over time, grown to contain a mix of
right and wrong. It's one of the costs of doing things wrong.
> It's not a new driver, it's simply pasting a line from one place to
> another to update a field.
You already said all this.
Look, it's a single silly line, but there's a non-trivial point here.
It comes up quite regularly and I always encourage people to do things
the right way rather than matching the existing wrong code. Because,
when you think about it, there's really no merit in having consistently
wrong code. A mix of right and wrong is better than 100% wrong.
If it results in inconsistent-looking code then that's good. It may
result in some drive-by developer noticing the inconsistency and fixing
everything up.
Have a think about it.
prev parent reply other threads:[~2009-05-30 18:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-28 13:01 [PATCH] 8250: Fix oops from setserial Alan Cox
2009-05-30 3:54 ` Andrew Morton
2009-05-30 8:25 ` Alan Cox
2009-05-30 8:43 ` Andrew Morton
2009-05-30 10:46 ` Alan Cox
2009-05-30 18:50 ` Andrew Morton [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=20090530115024.04850195.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=vvscore@gmail.com \
/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