Commit 996908f0 authored by Paul Mackerras's avatar Paul Mackerras

PPC32: use the standard kernel min macro in a couple of places.

Patch from Rusty Russell.
parent aa0c9ee7
...@@ -183,10 +183,6 @@ static struct termios *serial_termios_locked[NR_PORTS]; ...@@ -183,10 +183,6 @@ static struct termios *serial_termios_locked[NR_PORTS];
#define TX_NUM_FIFO 4 #define TX_NUM_FIFO 4
#define TX_BUF_SIZE 32 #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 /* The async_struct in serial.h does not really give us what we
* need, so define our own here. * need, so define our own here.
*/ */
...@@ -1016,7 +1012,7 @@ static int rs_8xx_write(struct tty_struct * tty, int from_user, ...@@ -1016,7 +1012,7 @@ static int rs_8xx_write(struct tty_struct * tty, int from_user,
bdp = info->tx_cur; bdp = info->tx_cur;
while (1) { while (1) {
c = MIN(count, TX_BUF_SIZE); c = min(count, TX_BUF_SIZE);
if (c <= 0) if (c <= 0)
break; break;
...@@ -1763,7 +1759,7 @@ static void rs_8xx_wait_until_sent(struct tty_struct *tty, int timeout) ...@@ -1763,7 +1759,7 @@ static void rs_8xx_wait_until_sent(struct tty_struct *tty, int timeout)
*/ */
char_time = 1; char_time = 1;
if (timeout) if (timeout)
char_time = MIN(char_time, timeout); char_time = min(char_time, timeout);
#ifdef SERIAL_DEBUG_RS_WAIT_UNTIL_SENT #ifdef SERIAL_DEBUG_RS_WAIT_UNTIL_SENT
printk("In rs_wait_until_sent(%d) check=%lu...", timeout, char_time); printk("In rs_wait_until_sent(%d) check=%lu...", timeout, char_time);
printk("jiff=%lu...", jiffies); printk("jiff=%lu...", jiffies);
......
...@@ -183,10 +183,6 @@ static struct termios *serial_termios_locked[NR_PORTS]; ...@@ -183,10 +183,6 @@ static struct termios *serial_termios_locked[NR_PORTS];
#define TX_NUM_FIFO 4 #define TX_NUM_FIFO 4
#define TX_BUF_SIZE 32 #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 /* The async_struct in serial.h does not really give us what we
* need, so define our own here. * need, so define our own here.
*/ */
...@@ -1098,7 +1094,7 @@ static int rs_8xx_write(struct tty_struct * tty, int from_user, ...@@ -1098,7 +1094,7 @@ static int rs_8xx_write(struct tty_struct * tty, int from_user,
bdp = info->tx_cur; bdp = info->tx_cur;
while (1) { while (1) {
c = MIN(count, TX_BUF_SIZE); c = min(count, TX_BUF_SIZE);
if (c <= 0) if (c <= 0)
break; break;
...@@ -1807,7 +1803,7 @@ static void rs_8xx_wait_until_sent(struct tty_struct *tty, int timeout) ...@@ -1807,7 +1803,7 @@ static void rs_8xx_wait_until_sent(struct tty_struct *tty, int timeout)
*/ */
char_time = 1; char_time = 1;
if (timeout) if (timeout)
char_time = MIN(char_time, timeout); char_time = min(char_time, timeout);
#ifdef SERIAL_DEBUG_RS_WAIT_UNTIL_SENT #ifdef SERIAL_DEBUG_RS_WAIT_UNTIL_SENT
printk("In rs_wait_until_sent(%d) check=%lu...", timeout, char_time); printk("In rs_wait_until_sent(%d) check=%lu...", timeout, char_time);
printk("jiff=%lu...", jiffies); printk("jiff=%lu...", jiffies);
......
...@@ -40,13 +40,9 @@ ...@@ -40,13 +40,9 @@
#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
#ifndef MIN
#define MIN(a,b) (((a) < (b)) ? (a) : (b))
#endif
extern void sigreturn_exit(struct pt_regs *); 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 * These are the flags in the MSR that the user is allowed to change
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment