提交 775b048d 编写于 作者: A Al Viro 提交者: Linus Torvalds

[PATCH] cyblafb: portability fixes, sanitized work with pointers

Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
Acked-by: NKnut Petersen <Knut_Petersen@t-online.de>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 87e0f3db
...@@ -410,20 +410,21 @@ static void cyblafb_imageblit(struct fb_info *info, ...@@ -410,20 +410,21 @@ static void cyblafb_imageblit(struct fb_info *info,
out32(GE0C,point(image->dx+image->width-1,image->dy+image->height-1)); out32(GE0C,point(image->dx+image->width-1,image->dy+image->height-1));
while(index < index_end) { while(index < index_end) {
const char *p = image->data + index;
for(i=0;i<width_dds;i++) { for(i=0;i<width_dds;i++) {
out32(GE9C,*((u32*) ((u32)image->data + index))); out32(GE9C,*(u32*)p);
p+=4;
index+=4; index+=4;
} }
switch(width_dbs) { switch(width_dbs) {
case 0: break; case 0: break;
case 8: out32(GE9C,*((u8*)((u32)image->data+index))); case 8: out32(GE9C,*(u8*)p);
index+=1; index+=1;
break; break;
case 16: out32(GE9C,*((u16*)((u32)image->data+index))); case 16: out32(GE9C,*(u16*)p);
index+=2; index+=2;
break; break;
case 24: out32(GE9C,(u32)(*((u16*)((u32)image->data+index))) | case 24: out32(GE9C,*(u16*)p | *(u8*)(p+2)<<16);
(u32)(*((u8*)((u32)image->data+index+2)))<<16);
index+=3; index+=3;
break; break;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册