linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: <jani@virtualro.ic.ro>
To: jsimmons@suse.com
Cc: linux-kernel@vger.kernel.org
Subject: [patch] some cleanup in vgacon.c
Date: Tue, 21 Nov 2000 23:51:25 +0200 (EET)	[thread overview]
Message-ID: <Pine.LNX.4.10.10011212336210.11105-100000@virtualro.ic.ro> (raw)


Hi James 
	this is a newer cleaning patch for vgacon.c against test11.
It includes the one I sent a couple of days ago.Could you check this too
and if OK send it to Linus?Unless of course it violates the code-freeze
policy :-)

Thanks,
	 Jani.

It does the following

1)Removes explicit static initialisation

2)Removes a duplicated code line in vgacon_scroll

3)Removes the static variable vga_hardscroll_user_enable which I guess was 
superfluous since it was only indirectly used by vga_hardscroll_enabled.
The no-scroll option still works for me :-)

4)Removed 3 #includes: fs.h ,sched.h and malloc.h seem never to be used,
and besides fs.h is very large :-).I think string.h isn't needed either
but maybe on non x86 ?
It compiles and works without them and I hope no other architecture uses
these headers in vgacon.It would be awkward....


--- /usr/src/patches/original/vgacon/vgacon.c	Tue Nov 21 22:52:04 2000
+++ vgacon.c	Tue Nov 21 23:34:33 2000
@@ -35,15 +35,12 @@
 
 #include <linux/config.h>
 #include <linux/types.h>
-#include <linux/sched.h>
-#include <linux/fs.h>
 #include <linux/kernel.h>
 #include <linux/tty.h>
 #include <linux/console.h>
 #include <linux/console_struct.h>
 #include <linux/string.h>
 #include <linux/kd.h>
-#include <linux/malloc.h>
 #include <linux/vt_kern.h>
 #include <linux/selection.h>
 #include <linux/spinlock.h>
@@ -104,17 +101,17 @@
 static u16             vga_video_port_val;	/* Video register value port */
 static unsigned int    vga_video_num_columns;	/* Number of text columns */
 static unsigned int    vga_video_num_lines;	/* Number of text lines */
-static int	       vga_can_do_color = 0;	/* Do we support colors? */
+static int	       vga_can_do_color;	/* Do we support colors? */
 static unsigned int    vga_default_font_height;	/* Height of default screen font */
 static unsigned char   vga_video_type;		/* Card type */
-static unsigned char   vga_hardscroll_enabled;
+
 #ifdef CONFIG_IA64_SOFTSDV_HACKS
 /*
  * SoftSDV doesn't have hardware assist VGA scrolling 
  */
-static unsigned char   vga_hardscroll_user_enable = 0;
+static unsigned char   vga_hardscroll_enabled; 
 #else
-static unsigned char   vga_hardscroll_user_enable = 1;
+static unsigned char   vga_hardscroll_enabled = 1; 
 #endif
 static unsigned char   vga_font_is_default = 1;
 static int	       vga_vesa_blanked;
@@ -122,7 +119,7 @@
 static int	       vga_is_gfx;
 static int	       vga_512_chars;
 static int	       vga_video_font_height;
-static unsigned int    vga_rolled_over = 0;
+static unsigned int    vga_rolled_over;
 
 
 static int __init no_scroll(char *str)
@@ -132,7 +129,7 @@
 	 * Braille reader made by F.H. Papenmeier (Germany).
 	 * Use the "no-scroll" bootflag.
 	 */
-	vga_hardscroll_user_enable = vga_hardscroll_enabled = 0;
+	vga_hardscroll_enabled = 0;
 	return 1;
 }
 
@@ -316,7 +313,6 @@
 	if (vga_video_type == VIDEO_TYPE_EGAC
 	    || vga_video_type == VIDEO_TYPE_VGAC
 	    || vga_video_type == VIDEO_TYPE_EGAM) {
-		vga_hardscroll_enabled = vga_hardscroll_user_enable;
 		vga_default_font_height = ORIG_VIDEO_POINTS;
 		vga_video_font_height = ORIG_VIDEO_POINTS;
 		/* This may be suboptimal but is a safe bet - go with it */
@@ -965,7 +961,7 @@
 
 static void vgacon_save_screen(struct vc_data *c)
 {
-	static int vga_bootup_console = 0;
+	static int vga_bootup_console;
 
 	if (!vga_bootup_console) {
 		/* This is a gross hack, but here is the only place we can
@@ -1015,7 +1011,6 @@
 			vga_rolled_over = 0;
 		} else
 			c->vc_origin -= delta;
-		c->vc_scr_end = c->vc_origin + c->vc_screenbuf_size;
 		scr_memsetw((u16 *)(c->vc_origin), c->vc_video_erase_char, delta);
 	}
 	c->vc_scr_end = c->vc_origin + c->vc_screenbuf_size;

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

             reply	other threads:[~2000-11-21 22:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-11-21 21:51 jani [this message]
2000-11-22 23:11 ` [patch] some cleanup in vgacon.c 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=Pine.LNX.4.10.10011212336210.11105-100000@virtualro.ic.ro \
    --to=jani@virtualro.ic.ro \
    --cc=jsimmons@suse.com \
    --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;
as well as URLs for NNTP newsgroup(s).