kill ide-lib.c warning

Message ID Pine.GSO.4.21.0210101846170.2509-100000@vervain.sonytel.be
State New, archived
Headers show
Series
  • kill ide-lib.c warning
Related show

Commit Message

Geert Uytterhoeven Oct. 10, 2002, 4:48 p.m. UTC
Kill warning (speed is u8, while XFER_PIO_4 is int)

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

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Comments

Alan Cox Oct. 10, 2002, 5:25 p.m. UTC | #1
On Thu, 2002-10-10 at 17:48, Geert Uytterhoeven wrote:
> 
> Kill warning (speed is u8, while XFER_PIO_4 is int)
> 
> --- linux-2.5.41/drivers/ide/ide-lib.c	Sun Sep 29 11:03:01 2002
> +++ linux-m68k-2.5.41/drivers/ide/ide-lib.c	Thu Oct 10 17:51:25 2002
> @@ -171,7 +171,7 @@
>  		BUG();
>  	return min(speed, speed_max[mode]);
>  #else /* !CONFIG_BLK_DEV_IDEDMA */
> -	return min(speed, XFER_PIO_4);
> +	return min(speed, (__typeof(speed))XFER_PIO_4);

I'd prefer (u8) - that way if it changes again we'll get the warning
back

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Patch

--- linux-2.5.41/drivers/ide/ide-lib.c	Sun Sep 29 11:03:01 2002
+++ linux-m68k-2.5.41/drivers/ide/ide-lib.c	Thu Oct 10 17:51:25 2002
@@ -171,7 +171,7 @@ 
 		BUG();
 	return min(speed, speed_max[mode]);
 #else /* !CONFIG_BLK_DEV_IDEDMA */
-	return min(speed, XFER_PIO_4);
+	return min(speed, (__typeof(speed))XFER_PIO_4);
 #endif /* CONFIG_BLK_DEV_IDEDMA */
 }