From: Michael Veeck <michael.veeck@gmx.net>
To: kernel-janitors@vger.kernel.org
Subject: [Kernel-janitors] [PATCH] drivers/sbus/char/ minmax removal and
Date: Mon, 12 Jul 2004 15:38:36 +0000 [thread overview]
Message-ID: <40F2B07C.9050108@gmx.net> (raw)
[-- Attachment #1: Type: text/plain, Size: 428 bytes --]
This patch (against 2.6.8-rc1) removes minmax-macros and changes calls
to use kernel.h macros instead.
Now heres the problem: Since all that is left on my minmax-todolist are
arch-specific-files, is there a way to cross-compile the kernel image so
that I can at least test if the patches compile? Sort of like "compile
everything there is, even if its hardware that wont ever exist on my
plattform" ?
Best regards
Veeck
[-- Attachment #2: drivers-sbus-minmax.patch --]
[-- Type: text/plain, Size: 2096 bytes --]
diff -uprN -X dontdiff linux-2.6.8-rc1-old/drivers/sbus/char/aurora.c linux-2.6.8-rc1-new/drivers/sbus/char/aurora.c
--- linux-2.6.8-rc1-old/drivers/sbus/char/aurora.c 2004-07-04 11:04:15.000000000 +0200
+++ linux-2.6.8-rc1-new/drivers/sbus/char/aurora.c 2004-07-12 17:01:09.432458176 +0200
@@ -81,10 +81,6 @@ unsigned char irqs[4] = {
int irqhit=0;
#endif
-#ifndef MIN
-#define MIN(a,b) ((a) < (b) ? (a) : (b))
-#endif
-
static struct tty_driver *aurora_driver;
static struct Aurora_board aurora_board[AURORA_NBOARD] = {
{0,},
@@ -594,7 +590,7 @@ static void aurora_transmit(struct Auror
&bp->r[chip]->r[CD180_TDR]);
port->COR2 &= ~COR2_ETC;
}
- count = MIN(port->break_length, 0xff);
+ count = min_t(unsigned char, port->break_length, 0xff);
sbus_writeb(CD180_C_ESC,
&bp->r[chip]->r[CD180_TDR]);
sbus_writeb(CD180_C_DELAY,
@@ -1577,8 +1573,8 @@ static int aurora_write(struct tty_struc
if (from_user) {
down(&tmp_buf_sem);
while (1) {
- c = MIN(count, MIN(SERIAL_XMIT_SIZE - port->xmit_cnt - 1,
- SERIAL_XMIT_SIZE - port->xmit_head));
+ c = min_t(int, count, min(SERIAL_XMIT_SIZE - port->xmit_cnt - 1,
+ SERIAL_XMIT_SIZE - port->xmit_head));
if (c <= 0)
break;
@@ -1589,8 +1585,8 @@ static int aurora_write(struct tty_struc
break;
}
cli();
- c = MIN(c, MIN(SERIAL_XMIT_SIZE - port->xmit_cnt - 1,
- SERIAL_XMIT_SIZE - port->xmit_head));
+ c = min_t(int, c, min(SERIAL_XMIT_SIZE - port->xmit_cnt - 1,
+ SERIAL_XMIT_SIZE - port->xmit_head));
memcpy(port->xmit_buf + port->xmit_head, tmp_buf, c);
port->xmit_head = (port->xmit_head + c) & (SERIAL_XMIT_SIZE-1);
port->xmit_cnt += c;
@@ -1604,8 +1600,8 @@ static int aurora_write(struct tty_struc
} else {
while (1) {
cli();
- c = MIN(count, MIN(SERIAL_XMIT_SIZE - port->xmit_cnt - 1,
- SERIAL_XMIT_SIZE - port->xmit_head));
+ c = min_t(int, count, min(SERIAL_XMIT_SIZE - port->xmit_cnt - 1,
+ SERIAL_XMIT_SIZE - port->xmit_head));
if (c <= 0) {
restore_flags(flags);
break;
[-- Attachment #3: Type: text/plain, Size: 167 bytes --]
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors
next reply other threads:[~2004-07-12 15:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-12 15:38 Michael Veeck [this message]
2004-07-12 16:26 ` [Kernel-janitors] [PATCH] drivers/sbus/char/ minmax removal and Sven Schuster
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=40F2B07C.9050108@gmx.net \
--to=michael.veeck@gmx.net \
--cc=kernel-janitors@vger.kernel.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.