Signed-off-by: Andrew Morton --- 25-akpm/drivers/video/cfbfillrect.c | 13 +++++++------ 1 files changed, 7 insertions(+), 6 deletions(-) diff -puN drivers/video/cfbfillrect.c~c~fbdev-generic-drawing-function-cleanups-fix drivers/video/cfbfillrect.c --- 25/drivers/video/cfbfillrect.c~c~fbdev-generic-drawing-function-cleanups-fix 2005-02-19 02:54:45.000000000 -0800 +++ 25-akpm/drivers/video/cfbfillrect.c 2005-02-19 02:55:11.000000000 -0800 @@ -419,17 +419,18 @@ void cfb_fillrect(struct fb_info *p, con dst_idx += p->fix.line_length*8; } } else { - int rot = (left-dst_idx) % bpp; - - /* rotate pattern to correct start position */ - pat = pat << rot | pat >> (bpp-rot); - - int right = bpp-left; + int right; int r; + int rot = (left-dst_idx) % bpp; void (*fill_op)(unsigned long __iomem *dst, int dst_idx, unsigned long pat, int left, int right, unsigned n) = NULL; + + /* rotate pattern to correct start position */ + pat = pat << rot | pat >> (bpp-rot); + + right = bpp-left; switch (rect->rop) { case ROP_XOR: fill_op = bitfill_rev; _