]> git.hungrycats.org Git - linux/commitdiff
PPC32: use the standard kernel min macro in a couple of places.
authorPaul Mackerras <paulus@samba.org>
Tue, 28 May 2002 06:02:00 +0000 (16:02 +1000)
committerPaul Mackerras <paulus@samba.org>
Tue, 28 May 2002 06:02:00 +0000 (16:02 +1000)
Patch from Rusty Russell.

arch/ppc/8260_io/uart.c
arch/ppc/8xx_io/uart.c
arch/ppc/kernel/signal.c

index 8f3a9e91de100b6f4d2cc82090f65ba9c1e050b4..40a7e5ea6d0e589d76a0b04b04c18cd5523c29e2 100644 (file)
@@ -183,10 +183,6 @@ static struct termios *serial_termios_locked[NR_PORTS];
 #define TX_NUM_FIFO    4
 #define TX_BUF_SIZE    32
 
-#ifndef MIN
-#define MIN(a,b)       ((a) < (b) ? (a) : (b))
-#endif
-
 /* The async_struct in serial.h does not really give us what we
  * need, so define our own here.
  */
@@ -1016,7 +1012,7 @@ static int rs_8xx_write(struct tty_struct * tty, int from_user,
        bdp = info->tx_cur;
 
        while (1) {
-               c = MIN(count, TX_BUF_SIZE);
+               c = min(count, TX_BUF_SIZE);
 
                if (c <= 0)
                        break;
@@ -1763,7 +1759,7 @@ static void rs_8xx_wait_until_sent(struct tty_struct *tty, int timeout)
         */
        char_time = 1;
        if (timeout)
-               char_time = MIN(char_time, timeout);
+               char_time = min(char_time, timeout);
 #ifdef SERIAL_DEBUG_RS_WAIT_UNTIL_SENT
        printk("In rs_wait_until_sent(%d) check=%lu...", timeout, char_time);
        printk("jiff=%lu...", jiffies);
index 281fea1c8146e182162367a84d1e3cd7d7f30f5e..b2e8009a26ddaad4776f7b931c6b3f05bdc36644 100644 (file)
@@ -183,10 +183,6 @@ static struct termios *serial_termios_locked[NR_PORTS];
 #define TX_NUM_FIFO    4
 #define TX_BUF_SIZE    32
 
-#ifndef MIN
-#define MIN(a,b)       ((a) < (b) ? (a) : (b))
-#endif
-
 /* The async_struct in serial.h does not really give us what we
  * need, so define our own here.
  */
@@ -1098,7 +1094,7 @@ static int rs_8xx_write(struct tty_struct * tty, int from_user,
        bdp = info->tx_cur;
 
        while (1) {
-               c = MIN(count, TX_BUF_SIZE);
+               c = min(count, TX_BUF_SIZE);
 
                if (c <= 0)
                        break;
@@ -1807,7 +1803,7 @@ static void rs_8xx_wait_until_sent(struct tty_struct *tty, int timeout)
         */
        char_time = 1;
        if (timeout)
-               char_time = MIN(char_time, timeout);
+               char_time = min(char_time, timeout);
 #ifdef SERIAL_DEBUG_RS_WAIT_UNTIL_SENT
        printk("In rs_wait_until_sent(%d) check=%lu...", timeout, char_time);
        printk("jiff=%lu...", jiffies);
index 668602d2332c2aded7ce4ad9ac60bd1a429c4ea9..4629ae87aff232f8d88a8505b4e5c53eb9f51992 100644 (file)
 
 #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
 
-#ifndef MIN
-#define MIN(a,b) (((a) < (b)) ? (a) : (b))
-#endif
-
 extern void sigreturn_exit(struct pt_regs *);
 
-#define GP_REGS_SIZE   MIN(sizeof(elf_gregset_t), sizeof(struct pt_regs))
+#define GP_REGS_SIZE   min(sizeof(elf_gregset_t), sizeof(struct pt_regs))
 
 /* 
  * These are the flags in the MSR that the user is allowed to change