From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Mikael Pettersson <mikpe@csd.uu.se>
Cc: B.Zolnierkiewicz@elka.pw.edu.pl,
Linux Kernel Development <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] fix 2.6.0-test4 IDE warning
Date: Sun, 24 Aug 2003 12:49:13 +0200 (MEST) [thread overview]
Message-ID: <Pine.GSO.4.21.0308241248130.14076-100000@waterleaf.sonytel.be> (raw)
In-Reply-To: <200308231705.h7NH5Ai6024024@harpo.it.uu.se>
On Sat, 23 Aug 2003, Mikael Pettersson wrote:
> Compiling IDE in 2.6.0-test4 with CONFIG_BLK_DEV_IDEDMA=n results in:
>
> gcc -Wp,-MD,drivers/ide/.ide-lib.o.d -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=i486 -Iinclude/asm-i386/mach-default -D__KERNEL__ -Iinclude -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=i486 -Iinclude/asm-i386/mach-default -fomit-frame-pointer -nostdinc -iwithprefix include -DKBUILD_BASENAME=ide_lib -DKBUILD_MODNAME=ide_lib -c -o drivers/ide/ide-lib.o drivers/ide/ide-lib.c
> drivers/ide/ide-lib.c: In function `ide_rate_filter':
> drivers/ide/ide-lib.c:173: warning: comparison of distinct pointer types lacks a cast
>
> This is because the type-checking min() macro is applied to a u8
> variable and an int constant, resulting in a type mismatch. Fix below.
Alan rejected this a while ago. He said he'd more like the speed parameter
become an int, but that that would require more changes.
> (CONFIG_BLK_DEV_IDEDMA=n is what one gets on an old PCI-less 486.)
>
> /Mikael
>
> --- linux-2.6.0-test4/drivers/ide/ide-lib.c.~1~ 2003-08-09 11:54:06.000000000 +0200
> +++ linux-2.6.0-test4/drivers/ide/ide-lib.c 2003-08-23 18:43:52.000000000 +0200
> @@ -170,7 +170,7 @@
> BUG();
> return min(speed, speed_max[mode]);
> #else /* !CONFIG_BLK_DEV_IDEDMA */
> - return min(speed, XFER_PIO_4);
> + return min(speed, (u8)XFER_PIO_4);
> #endif /* CONFIG_BLK_DEV_IDEDMA */
> }
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
next prev parent reply other threads:[~2003-08-24 10:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-08-23 17:05 [PATCH] fix 2.6.0-test4 IDE warning Mikael Pettersson
2003-08-24 10:49 ` Geert Uytterhoeven [this message]
2003-08-27 16:09 ` Alan Cox
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=Pine.GSO.4.21.0308241248130.14076-100000@waterleaf.sonytel.be \
--to=geert@linux-m68k.org \
--cc=B.Zolnierkiewicz@elka.pw.edu.pl \
--cc=linux-kernel@vger.kernel.org \
--cc=mikpe@csd.uu.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;
as well as URLs for NNTP newsgroup(s).