All of lore.kernel.org
 help / color / mirror / Atom feed
* [Kernel-janitors] [PATCH] drivers/sbus/char/ minmax removal and
@ 2004-07-12 15:38 Michael Veeck
  2004-07-12 16:26 ` Sven Schuster
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Veeck @ 2004-07-12 15:38 UTC (permalink / raw)
  To: kernel-janitors

[-- 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-07-12 16:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-12 15:38 [Kernel-janitors] [PATCH] drivers/sbus/char/ minmax removal and Michael Veeck
2004-07-12 16:26 ` Sven Schuster

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.