[PATCH] fbcon: Fix screen pointer updating in bit_putcs
DORMANTno replies
From: "Antonino A. Daplas" <adaplas@gmail.com>
Date: 2005-09-02 13:56:03
Subsystem:
console subsystem, framebuffer layer, the rest · Maintainers:
Greg Kroah-Hartman, Helge Deller, Linus Torvalds
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 <redacted> --- 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