mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: linux-ide@vger.kernel.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [git patches] IDE fixes
Date: Wed, 23 May 2007 18:56:45 -0700 (PDT)	[thread overview]
Message-ID: <alpine.LFD.0.98.0705231850520.3890@woody.linux-foundation.org> (raw)
In-Reply-To: <200705240246.19039.bzolnier@gmail.com>



On Thu, 24 May 2007, Bartlomiej Zolnierkiewicz wrote:
> diff --git a/drivers/ide/pci/serverworks.c b/drivers/ide/pci/serverworks.c
> index 6234f80..47bcd91 100644
> --- a/drivers/ide/pci/serverworks.c
> +++ b/drivers/ide/pci/serverworks.c
> @@ -173,7 +179,7 @@ dma_pio:
>  				   ((dma_stat&(1<<(5+unit)))==(1<<(5+unit)))) {
>  				u8 dmaspeed = dma_timing;
>  
> -				dma_timing &= ~0xFF;
> +				dma_timing &= ~0xFFU;

This is just crap.

The old code was _also_ crap, but the new code just is worse. 

What's the point of this, really?

dma_timing is a 8-bit value, so the above is just a *really* stupid and 
bad way of saying

	dma_timing = 0;

and whoever wrote that code is just terminally confused.

I pulled, but that driver is CRAP. Please don't add new crap blindly like 
that. 

Andrew, that was your change, it appears. Tssk.

Please, we do NOT fix compiler warnings without understanding the code! 
That's a sure way to just introduce _new_ bugs, rather than fix old ones. 
So please, please, please, realize that the compiler is _stupid_, and 
fixing warnings without understanding the code is bad.

In this case, anybody who actually spends 5 seconds looking at the code 
should have realized that the warning is just another way of saying that 
the author of the code was on some bad drugs, and the warnings WERE BETTER 
OFF REMAINING! Because that code _should_ have warnings. Big fat warnings 
about incompetence!

		Linus

  reply	other threads:[~2007-05-24  1:57 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-24  0:46 Bartlomiej Zolnierkiewicz
2007-05-24  1:56 ` Linus Torvalds [this message]
2007-05-24  2:16   ` Linus Torvalds
  -- strict thread matches above, loose matches on Subject: below --
2008-07-05 18:38 Bartlomiej Zolnierkiewicz
2008-06-30 18:21 Bartlomiej Zolnierkiewicz
2008-06-20 18:07 Bartlomiej Zolnierkiewicz
2008-06-20 18:09 ` Alan Cox
2008-06-20 18:35   ` Grant Grundler
2008-06-20 19:00     ` Bartlomiej Zolnierkiewicz
2008-06-15 19:49 Bartlomiej Zolnierkiewicz
2008-06-15 23:33 ` Linus Torvalds
2008-06-16  0:04   ` Linus Torvalds
2008-06-16  9:10     ` Bartlomiej Zolnierkiewicz
2008-06-10 19:16 Bartlomiej Zolnierkiewicz
2008-05-14 21:18 Bartlomiej Zolnierkiewicz
2008-05-04 15:05 Bartlomiej Zolnierkiewicz
2008-05-01 12:18 Bartlomiej Zolnierkiewicz
2008-04-29 21:12 Bartlomiej Zolnierkiewicz
2008-04-16 23:15 Bartlomiej Zolnierkiewicz
2008-04-07 21:32 Bartlomiej Zolnierkiewicz
2008-04-02 19:26 Bartlomiej Zolnierkiewicz
2008-03-29 19:01 Bartlomiej Zolnierkiewicz
2008-03-22 16:14 Bartlomiej Zolnierkiewicz
2008-03-07 21:02 Bartlomiej Zolnierkiewicz
2008-02-26 20:57 Bartlomiej Zolnierkiewicz
2008-02-19  1:00 Bartlomiej Zolnierkiewicz
2008-02-11  0:06 Bartlomiej Zolnierkiewicz
2008-01-10 22:27 Bartlomiej Zolnierkiewicz
2007-12-24 14:37 Bartlomiej Zolnierkiewicz
2007-12-24 15:57 ` Bartlomiej Zolnierkiewicz
2007-12-12 23:03 Bartlomiej Zolnierkiewicz
2007-11-27 20:39 Bartlomiej Zolnierkiewicz
2007-11-13 21:13 Bartlomiej Zolnierkiewicz
2007-11-05 20:49 Bartlomiej Zolnierkiewicz
2007-10-26 18:34 Bartlomiej Zolnierkiewicz
2007-09-17 10:38 Bartlomiej Zolnierkiewicz
2007-08-20 20:49 Bartlomiej Zolnierkiewicz
2007-08-01 21:52 Bartlomiej Zolnierkiewicz
2007-07-08 13:26 Bartlomiej Zolnierkiewicz
2007-07-03 20:30 Bartlomiej Zolnierkiewicz
2007-06-16  0:28 Bartlomiej Zolnierkiewicz
2007-06-08 13:20 Bartlomiej Zolnierkiewicz
2007-04-20 20:19 Bartlomiej Zolnierkiewicz
2007-04-10 20:45 Bartlomiej Zolnierkiewicz
2007-03-17 21:07 Bartlomiej Zolnierkiewicz
2007-03-18  0:04 ` Linus Torvalds
2007-03-18  0:44   ` Bartlomiej Zolnierkiewicz

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=alpine.LFD.0.98.0705231850520.3890@woody.linux-foundation.org \
    --to=torvalds@linux-foundation.org \
    --cc=akpm@linux-foundation.org \
    --cc=bzolnier@gmail.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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®