linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fbcon: Fix screen pointer updating in bit_putcs
@ 2005-09-02 13:53 Antonino A. Daplas
  0 siblings, 0 replies; only message in thread
From: Antonino A. Daplas @ 2005-09-02 13:53 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Linux Fbdev development list

Bug reported by Knut Petersen:

The screen pointer (*s) is not updated if the loop is iterated more than
once.

Do not pass unused variables (xx, yy, and count) to the component function
of bit_putcs()

Signed-off-by: Antonino Daplas <adaplas@pol.net>

---
 bitblit.c |   20 +++++++++-----------
 1 files changed, 9 insertions(+), 11 deletions(-)


diff --git a/drivers/video/console/bitblit.c b/drivers/video/console/bitblit.c
--- a/drivers/video/console/bitblit.c
+++ b/drivers/video/console/bitblit.c
@@ -104,9 +104,8 @@ static void bit_clear(struct vc_data *vc
 }
 
 static inline void bit_putcs_aligned(struct vc_data *vc, struct fb_info *info,
-				     const u16 *s, u32 count, u32 yy, u32 xx,
-				     u32 attr, u32 cnt, u32 d_pitch,
-				     u32 s_pitch, u32 cellsize,
+				     const u16 *s, u32 attr, u32 cnt,
+				     u32 d_pitch, u32 s_pitch, u32 cellsize,
 				     struct fb_image *image, u8 *buf, u8 *dst)
 {
 	u16 charmask = vc->vc_hi_font_mask ? 0x1ff : 0xff;
@@ -136,8 +135,7 @@ static inline void bit_putcs_aligned(str
 }
 
 static inline void bit_putcs_unaligned(struct vc_data *vc,
-				       struct fb_info *info,
-				       const u16 *s, u32 count, u32 yy, u32 xx,
+				       struct fb_info *info, const u16 *s,
 				       u32 attr, u32 cnt, u32 d_pitch,
 				       u32 s_pitch, u32 cellsize,
 				       struct fb_image *image, u8 *buf,
@@ -213,16 +211,16 @@ static void bit_putcs(struct vc_data *vc
 		image.data = dst;
 
 		if (!mod)
-			bit_putcs_aligned(vc, info, s, count, yy, xx,
-					  attribute, cnt, pitch, width,
-					  cellsize, &image, buf, dst);
+			bit_putcs_aligned(vc, info, s, attribute, cnt, pitch,
+					  width, cellsize, &image, buf, dst);
 		else
-			bit_putcs_unaligned(vc, info, s, count, yy, xx,
-					    attribute, cnt, pitch, width,
-					    cellsize, &image, buf, dst);
+			bit_putcs_unaligned(vc, info, s, attribute, cnt,
+					    pitch, width, cellsize, &image,
+					    buf, dst);
 
 		image.dx += cnt * vc->vc_font.width;
 		count -= cnt;
+		s += cnt;
 	}
 
 	/* buf is always NULL except when in monochrome mode, so in this case



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-09-02 13:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-02 13:53 [PATCH] fbcon: Fix screen pointer updating in bit_putcs Antonino A. Daplas

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).