if (info->pixmap.outbuf && info->pixmap.inbuf) { move_aligned = fb_iomove_buf_aligned; move_unaligned = fb_iomove_buf_unaligned; } else { move_aligned = fb_sysmove_buf_aligned; move_unaligned = fb_sysmove_buf_unaligned; } 
static void bit_putcs(struct vc_data *vc, struct fb_info *info,		      const unsigned short *s, int count, int yy, int xx,		      int fg, int bg){	void (*move_unaligned)(struct fb_info *info, struct fb_pixmap *buf,			       u8 *dst, u32 d_pitch, u8 *src, u32 idx,			       u32 height, u32 shift_high, u32 shift_low,			       u32 mod);	void (*move_aligned)(struct fb_info *info, struct fb_pixmap *buf,			     u8 *dst, u32 d_pitch, u8 *src, u32 s_pitch,			     u32 height);	unsigned short charmask = vc->vc_hi_font_mask ? 0x1ff : 0xff;	unsigned int width = (vc->vc_font.width + 7) >> 3;	unsigned int cellsize = vc->vc_font.height * width;	unsigned int maxcnt = info->pixmap.size/cellsize;	unsigned int scan_align = info->pixmap.scan_align - 1;	unsigned int buf_align = info->pixmap.buf_align - 1;	unsigned int shift_low = 0, mod = vc->vc_font.width % 8;	unsigned int shift_high = 8, pitch, cnt, size, k;	unsigned int idx = vc->vc_font.width >> 3;	unsigned int attribute = get_attribute(info, scr_readw(s));	struct fb_image image;	u8 *src, *dst, *buf = NULL;	if (attribute) {		buf = kmalloc(cellsize, GFP_KERNEL);		if (!buf)			return;	}	image.fg_color = fg;	image.bg_color = bg;	image.dx = xx * vc->vc_font.width;	image.dy = yy * vc->vc_font.height;	image.height = vc->vc_font.height;	image.depth = 1;	if (info->pixmap.outbuf && info->pixmap.inbuf) {		move_aligned = fb_iomove_buf_aligned;		move_unaligned = fb_iomove_buf_unaligned;	} else {		move_aligned = fb_sysmove_buf_aligned;		move_unaligned = fb_sysmove_buf_unaligned;	}	while (count) {		if (count > maxcnt)			cnt = k = maxcnt;		else			cnt = k = count;		image.width = vc->vc_font.width * cnt;		pitch = ((image.width + 7) >> 3) + scan_align;		pitch &= ~scan_align;		size = pitch * image.height + buf_align;		size &= ~buf_align;		dst = fb_get_buffer_offset(info, &info->pixmap, size);		image.data = dst;		if (mod) {			while (k--) {				src = vc->vc_font.data + (scr_readw(s++)&							  charmask)*cellsize;				if (attribute) {					update_attr(buf, src, attribute, vc);					src = buf;				}				move_unaligned(info, &info->pixmap, dst, pitch,					       src, idx, image.height,					       shift_high, shift_low, mod);				shift_low += mod;				dst += (shift_low >= 8) ? width : width - 1;				shift_low &= 7;				shift_high = 8 - shift_low;			}		} else {			while (k--) {				src = vc->vc_font.data + (scr_readw(s++)&							  charmask)*cellsize;				if (attribute) {					update_attr(buf, src, attribute, vc);					src = buf;				}				move_aligned(info, &info->pixmap, dst, pitch,					     src, idx, image.height);				dst += width;			}		}		info->fbops->fb_imageblit(info, &image);		image.dx += cnt * vc->vc_font.width;		count -= cnt;	}	/* buf is always NULL except when in monochrome mode, so in this case	   it's a gain to check buf against NULL even though kfree() handles	   NULL pointers just fine */	if (unlikely(buf))		kfree(buf);}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/f5a9951c94e7a285a3d00648e3d790a7f016bd11/bitblit.c/buggy/drivers/video/console/bitblit.c