mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Cleanup drivers/char/console.c
@ 2002-02-13 23:40 Timothy Ball
  2002-02-13 23:48 ` James Simmons
  0 siblings, 1 reply; 2+ messages in thread
From: Timothy Ball @ 2002-02-13 23:40 UTC (permalink / raw)
  To: akpm; +Cc: Linux Kernel Mailing List

The following patch cleans up the FLUSH macro used in
drivers/char/console.c. I haven't made any deep dark changes... just
added a ";" at the end of the lines where FLUSH is called, cause it
looked pretty wierd w/o it.

--timball

--snip--snip--snip--
--- console.c.orig	Wed Feb 13 18:21:25 2002
+++ console.c	Wed Feb 13 18:35:16 2002
@@ -1830,12 +1830,14 @@
 			const unsigned char *buf, int count)
 {
 #ifdef VT_BUF_VRAM_ONLY
-#define FLUSH do { } while(0);
+#define FLUSH() do { } while(0)
 #else
-#define FLUSH if (draw_x >= 0) { \
-	sw->con_putcs(vc_cons[currcons].d, (u16 *)draw_from, (u16 *)draw_to-(u16 *)draw_from, y, draw_x); \
-	draw_x = -1; \
-	}
+#define FLUSH() do { \
+        if (draw_x >= 0) { \
+        sw->con_putcs(vc_cons[currcons].d, (u16 *)draw_from, (u16 *)draw_to-(u16 *)draw_from, y, draw_x); \
+        draw_x = -1; \
+        } \
+   } while(0)
 #endif
 
 	int c, tc, ok, n = 0, draw_x = -1;
@@ -1975,7 +1977,7 @@
                                 continue; /* Conversion failed */
 
 			if (need_wrap || decim)
-				FLUSH
+				FLUSH();
 			if (need_wrap) {
 				cr(currcons);
 				lf(currcons);
@@ -1999,10 +2001,10 @@
 			}
 			continue;
 		}
-		FLUSH
+		FLUSH();
 		do_con_trol(tty, currcons, c);
 	}
-	FLUSH
+	FLUSH();
 	console_conditional_schedule();
 	release_console_sem();
 
@@ -2024,7 +2026,7 @@
 	}
 
 	return n;
-#undef FLUSH
+#undef FLUSH()
 }
 
 /*

-- 
	GPG key available on pgpkeys.mit.edu
pub  1024D/511FBD54 2001-07-23 Timothy Lu Hu Ball <timball@tux.org>
Key fingerprint = B579 29B0 F6C8 C7AA 3840  E053 FE02 BB97 511F BD54

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

* Re: Cleanup drivers/char/console.c
  2002-02-13 23:40 Cleanup drivers/char/console.c Timothy Ball
@ 2002-02-13 23:48 ` James Simmons
  0 siblings, 0 replies; 2+ messages in thread
From: James Simmons @ 2002-02-13 23:48 UTC (permalink / raw)
  To: Timothy Ball; +Cc: akpm, Linux Kernel Mailing List


> The following patch cleans up the FLUSH macro used in
> drivers/char/console.c. I haven't made any deep dark changes... just
> added a ";" at the end of the lines where FLUSH is called, cause it
> looked pretty wierd w/o it.

I'm reworking the VT system right now. That macro is going to go away.


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

end of thread, other threads:[~2002-02-13 23:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-02-13 23:40 Cleanup drivers/char/console.c Timothy Ball
2002-02-13 23:48 ` James Simmons

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®