]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
tx493xide: use min_t() macro instead of min()
authorAtsushi Nemoto <anemo@mba.ocn.ne.jp>
Fri, 4 Jun 2010 23:19:23 +0000 (16:19 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 9 Aug 2010 10:17:55 +0000 (03:17 -0700)
This fixes a warning ("comparison of distinct pointer types lacks a
cast") introduced by the commit
040f6b4f14adb2ca5babb84e9fb2ebc6661e0be2 ("tx493xide: use ->pio_mode
value to determine pair device speed").

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/ide/tx4938ide.c
drivers/ide/tx4939ide.c

index 1d80f1fdbc973edc18bf77115d4aa612557b3e9e..7002765b593ce052b8f72acf7e0dda5ddf1261df 100644 (file)
@@ -64,7 +64,7 @@ static void tx4938ide_set_pio_mode(ide_hwif_t *hwif, ide_drive_t *drive)
 
        pair = ide_get_pair_dev(drive);
        if (pair)
-               safe = min(safe, pair->pio_mode - XFER_PIO_0);
+               safe = min_t(u8, safe, pair->pio_mode - XFER_PIO_0);
        tx4938ide_tune_ebusc(pdata->ebus_ch, pdata->gbus_clock, safe);
 }
 
index 3c73677518733175d6497be954a72f4f08841e9b..bed3e39aac9610ac2434558e32295b1c59a8e8ea 100644 (file)
@@ -114,7 +114,7 @@ static void tx4939ide_set_pio_mode(ide_hwif_t *hwif, ide_drive_t *drive)
 
        pair = ide_get_pair_dev(drive);
        if (pair)
-               safe = min(safe, pair->pio_mode - XFER_PIO_0);
+               safe = min_t(u8, safe, pair->pio_mode - XFER_PIO_0);
        /*
         * Update Command Transfer Mode for master/slave and Data
         * Transfer Mode for this drive.