* [PATCH]: sgiserial 4/7: s/MIN/min/
@ 2003-03-27 2:54 Juan Quintela
0 siblings, 0 replies; only message in thread
From: Juan Quintela @ 2003-03-27 2:54 UTC (permalink / raw)
To: Ralf Baechle, mipslist
Hi
use min() instead of local defined MIN().
build/drivers/sgi/char/sgiserial.c | 10 +++-------
1 files changed, 3 insertions(+), 7 deletions(-)
diff -puN build/drivers/sgi/char/sgiserial.c~sgiserial_MIN build/drivers/sgi/char/sgiserial.c
--- 24/build/drivers/sgi/char/sgiserial.c~sgiserial_MIN 2003-03-22 02:02:12.000000000 +0100
+++ 24-quintela/build/drivers/sgi/char/sgiserial.c 2003-03-22 02:02:53.000000000 +0100
@@ -124,10 +124,6 @@ static struct tty_struct *serial_table[N
static struct termios *serial_termios[NUM_CHANNELS];
static struct termios *serial_termios_locked[NUM_CHANNELS];
-#ifndef MIN
-#define MIN(a,b) ((a) < (b) ? (a) : (b))
-#endif
-
/*
* tmp_buf is used as a temporary buffer by serial_write. We need to
* lock it in case the memcpy_fromfs blocks while swapping in a page,
@@ -985,7 +981,7 @@ static void rs_fair_output(void)
zs_cons_put_char(c);
save_flags(flags); cli();
- left = MIN(info->xmit_cnt, left-1);
+ left = min(info->xmit_cnt, left-1);
}
/* Last character is being transmitted now (hopefully). */
@@ -1014,7 +1010,7 @@ static int rs_write(struct tty_struct *
save_flags(flags);
while (1) {
cli();
- c = MIN(count, MIN(SERIAL_XMIT_SIZE - info->xmit_cnt - 1,
+ c = min(count, min(SERIAL_XMIT_SIZE - info->xmit_cnt - 1,
SERIAL_XMIT_SIZE - info->xmit_head));
if (c <= 0)
break;
@@ -1022,7 +1018,7 @@ static int rs_write(struct tty_struct *
if (from_user) {
down(&tmp_buf_sem);
copy_from_user(tmp_buf, buf, c);
- c = MIN(c, MIN(SERIAL_XMIT_SIZE - info->xmit_cnt - 1,
+ c = min(c, min(SERIAL_XMIT_SIZE - info->xmit_cnt - 1,
SERIAL_XMIT_SIZE - info->xmit_head));
memcpy(info->xmit_buf + info->xmit_head, tmp_buf, c);
up(&tmp_buf_sem);
_
--
In theory, practice and theory are the same, but in practice they
are different -- Larry McVoy
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-03-27 2:57 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-03-27 2:54 [PATCH]: sgiserial 4/7: s/MIN/min/ Juan Quintela
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox