<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">
From: James Simmons &lt;jsimmons@infradead.org&gt;

This patch removes the redundent calculation of p-&gt;vrows.  This is done in
fbcon_resize.


---

 25-akpm/drivers/video/console/fbcon.c |   19 ++-----------------
 1 files changed, 2 insertions(+), 17 deletions(-)

diff -puN drivers/video/console/fbcon.c~fbdev-redundant-prows-calculation-removal drivers/video/console/fbcon.c
--- 25/drivers/video/console/fbcon.c~fbdev-redundant-prows-calculation-removal	Tue Apr 20 14:37:59 2004
+++ 25-akpm/drivers/video/console/fbcon.c	Tue Apr 20 14:37:59 2004
@@ -749,14 +749,6 @@ static void fbcon_set_display(struct vc_
 		vc-&gt;vc_cols = nr_cols;
 		vc-&gt;vc_rows = nr_rows;
 	}
-	p-&gt;vrows = info-&gt;var.yres_virtual / vc-&gt;vc_font.height;
-	if(info-&gt;var.yres &gt; (vc-&gt;vc_font.height * (vc-&gt;vc_rows + 1))) {
-		p-&gt;vrows -= (info-&gt;var.yres - (vc-&gt;vc_font.height * vc-&gt;vc_rows)) / vc-&gt;vc_font.height;
-	}
-	if ((info-&gt;var.yres % vc-&gt;vc_font.height) &amp;&amp;
-	    (info-&gt;var.yres_virtual % vc-&gt;vc_font.height &lt;
-	     info-&gt;var.yres % vc-&gt;vc_font.height))
-		p-&gt;vrows--;
 	vc-&gt;vc_can_do_color = info-&gt;var.bits_per_pixel != 1;
 	vc-&gt;vc_complement_mask = vc-&gt;vc_can_do_color ? 0x7700 : 0x0800;
 	if (charcnt == 256) {
@@ -1567,6 +1559,8 @@ static int fbcon_resize(struct vc_data *
 	p-&gt;vrows = var.yres_virtual/fh;
 	if (var.yres &gt; (fh * (height + 1)))
 		p-&gt;vrows -= (var.yres - (fh * height)) / fh;
+	if ((var.yres % fh) &amp;&amp; (var.yres_virtual % fh &lt; var.yres % fh))
+		p-&gt;vrows--;
 	return 0;
 }
 
@@ -1836,15 +1830,6 @@ static int fbcon_do_set_font(struct vc_d
 	if (resize) {
 		/* reset wrap/pan */
 		info-&gt;var.xoffset = info-&gt;var.yoffset = p-&gt;yscroll = 0;
-		p-&gt;vrows = info-&gt;var.yres_virtual / h;
-
-#if 0          /* INCOMPLETE - let the console gurus handle this */
-		if(info-&gt;var.yres &gt; (h * (vc-&gt;vc_rows + 1))
-			p-&gt;vrows -= (info-&gt;var.yres - (h * vc-&gt;vc_rows)) / h;
-#endif
-		if ((info-&gt;var.yres % h)
-		    &amp;&amp; (info-&gt;var.yres_virtual % h &lt; info-&gt;var.yres % h))
-			p-&gt;vrows--;
 		updatescrollmode(p, vc);
 		vc_resize(vc-&gt;vc_num, info-&gt;var.xres / w, info-&gt;var.yres / h);
 		if (CON_IS_VISIBLE(vc) &amp;&amp; softback_buf) {

_
</pre></body></html>