From: "Antonino A. Daplas" <adaplas@gmail.com>

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>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

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

diff -puN drivers/video/console/bitblit.c~fbcon-break-up-bit_putcs-into-its-component-functions-fix drivers/video/console/bitblit.c
--- devel/drivers/video/console/bitblit.c~fbcon-break-up-bit_putcs-into-its-component-functions-fix	2005-09-02 13:14:27.000000000 -0700
+++ devel-akpm/drivers/video/console/bitblit.c	2005-09-02 13:14:27.000000000 -0700
@@ -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
_