mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Timothy Ball <timball@tux.org>
To: akpm@zip.com.au
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Cleanup drivers/char/console.c
Date: Wed, 13 Feb 2002 18:40:00 -0500	[thread overview]
Message-ID: <20020213234000.GA2538@gwyn.tux.org> (raw)

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

             reply	other threads:[~2002-02-13 23:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-13 23:40 Timothy Ball [this message]
2002-02-13 23:48 ` James Simmons

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=20020213234000.GA2538@gwyn.tux.org \
    --to=timball@tux.org \
    --cc=akpm@zip.com.au \
    --cc=linux-kernel@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 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®