From: maximilian attems <janitor@sternwelten.at>
To: support@comtrol.com
Cc: linux-kernel@vger.kernel.org
Subject: [patch-kj] MIN/MAX removal drivers/char/rocket.c
Date: Sun, 25 Jul 2004 14:18:05 +0200 [thread overview]
Message-ID: <20040725121805.GB1756@stro.at> (raw)
Patch (against 2.6.7) removes unnecessary min/max macros and changes
calls to use kernel.h macros instead.
patch applies cleanly to 2.6.8-rc2
From: michael.veeck at gmx.net (Michael Veeck)
Signed-off-by: Maximilian Attems <janitor@sternwelten.at>
---
linux-2.6.7-bk20-max/drivers/char/rocket.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff -puN drivers/char/rocket.c~min-max-char_rocket drivers/char/rocket.c
--- linux-2.6.7-bk20/drivers/char/rocket.c~min-max-char_rocket 2004-07-11 14:58:48.000000000 +0200
+++ linux-2.6.7-bk20-max/drivers/char/rocket.c 2004-07-11 14:58:48.000000000 +0200
@@ -389,7 +389,7 @@ static void rp_do_transmit(struct r_port
while (1) {
if (tty->stopped || tty->hw_stopped)
break;
- c = MIN(info->xmit_fifo_room, MIN(info->xmit_cnt, XMIT_BUF_SIZE - info->xmit_tail));
+ c = min(info->xmit_fifo_room, min(info->xmit_cnt, XMIT_BUF_SIZE - info->xmit_tail));
if (c <= 0 || info->xmit_fifo_room <= 0)
break;
sOutStrW(sGetTxRxDataIO(cp), (unsigned short *) (info->xmit_buf + info->xmit_tail), c / 2);
@@ -1662,7 +1662,7 @@ static int rp_write(struct tty_struct *t
* into FIFO. Use the write queue for temp storage.
*/
if (!tty->stopped && !tty->hw_stopped && info->xmit_cnt == 0 && info->xmit_fifo_room > 0) {
- c = MIN(count, info->xmit_fifo_room);
+ c = min(count, info->xmit_fifo_room);
b = buf;
if (from_user) {
if (copy_from_user(info->xmit_buf, buf, c)) {
@@ -1672,7 +1672,7 @@ static int rp_write(struct tty_struct *t
if (info->tty == 0)
goto end;
b = info->xmit_buf;
- c = MIN(c, info->xmit_fifo_room);
+ c = min(c, info->xmit_fifo_room);
}
/* Push data into FIFO, 2 bytes at a time */
@@ -1700,7 +1700,7 @@ static int rp_write(struct tty_struct *t
if (info->tty == 0) /* Seemingly obligatory check... */
goto end;
- c = MIN(count, MIN(XMIT_BUF_SIZE - info->xmit_cnt - 1, XMIT_BUF_SIZE - info->xmit_head));
+ c = min(count, min(XMIT_BUF_SIZE - info->xmit_cnt - 1, XMIT_BUF_SIZE - info->xmit_head));
if (c <= 0)
break;
reply other threads:[~2004-07-25 12:18 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=20040725121805.GB1756@stro.at \
--to=janitor@sternwelten.at \
--cc=linux-kernel@vger.kernel.org \
--cc=support@comtrol.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®