[lkml]   [2003]   [Aug]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH] fix 2.6.0-test4 IDE warning
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.

(CONFIG_BLK_DEV_IDEDMA=n is what one gets on an old PCI-less 486.)


--- 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 @@
return min(speed, speed_max[mode]);
- return min(speed, XFER_PIO_4);
+ return min(speed, (u8)XFER_PIO_4);

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at
 \ /
  Last update: 2005-03-22 13:48    [W:0.069 / U:2.868 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site