From: Juan Quintela <quintela@mandrakesoft.com>
To: Ralf Baechle <ralf@linux-mips.org>, mipslist <linux-mips@linux-mips.org>
Subject: [PATCH]: sgiserial 4/7: s/MIN/min/
Date: Thu, 27 Mar 2003 03:54:17 +0100 [thread overview]
Message-ID: <m24r5pecyu.fsf@mandrakesoft.com> (raw)
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
reply other threads:[~2003-03-27 2:57 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m24r5pecyu.fsf@mandrakesoft.com \
--to=quintela@mandrakesoft.com \
--cc=linux-mips@linux-mips.org \
--cc=ralf@linux-mips.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.