Skip to contentSkip to conversation

remove spare cast

PATCH Geert Uytterhoeven 2 participants 2 messages Mar 7, 2003 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 18 lines · Linux Kernel Mailing List

ChangeSet 1.1068.10.40, 2003/03/06 17:44:05-08:00, [email protected]

[PATCH] remove spare cast

# This patch includes the following deltas:
# ChangeSet 1.1068.10.39 -> 1.1068.10.40
# drivers/ide/ide-lib.c 1.6 -> 1.7
#

 ide-lib.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -Nru a/drivers/ide/ide-lib.c b/drivers/ide/ide-lib.c

drivers/ide/ide-lib.c line 175

Quoted 6 lines
drivers/ide/ide-lib.c +1 -1
@@ -171,7 +171,7 @@
 		BUG();
 	return min(speed, speed_max[mode]);
 #else /* !CONFIG_BLK_DEV_IDEDMA */
-	return min(speed, (u8)XFER_PIO_4);
+	return min(speed, XFER_PIO_4);
 #endif /* CONFIG_BLK_DEV_IDEDMA */

This reintroduces the following warning (with gcc-2.95.2 and gcc-3.2)

| drivers/ide/ide-lib.c:174: warning: comparison of distinct pointer types | lacks a cast

which the cast was supposed to kill.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

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

#2 lore raw
Quoted 7 lines · Geert Uytterhoeven

This reintroduces the following warning (with gcc-2.95.2 and gcc-3.2)

| drivers/ide/ide-lib.c:174: warning: comparison of distinct pointer types | lacks a cast

which the cast was supposed to kill.

I know. Right now I don't care because I'm slowly turning all the u8 stuff back into ints which is actually less code and faster on most processors.