Skip to content

Commit

Permalink
fbdev: kill sparse warning in deferred IO
Browse files Browse the repository at this point in the history
Kill the following in fb_defio.c:

drivers/video/fb_defio.c:40:43: warning: incorrect type in argument 1 (different address spaces)
drivers/video/fb_defio.c:40:43:    expected void *addr
drivers/video/fb_defio.c:40:43:    got char [noderef] *screen_base<asn:2>

The framebuffer memory of these types of devices are allocated from system
RAM.

Signed-off-by: Antonino Daplas <adaplas@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Antonino A. Daplas authored and Linus Torvalds committed May 8, 2007
1 parent 895bf69 commit 98a1153
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/video/fb_defio.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,14 @@ static struct page* fb_deferred_io_nopage(struct vm_area_struct *vma,
unsigned long offset;
struct page *page;
struct fb_info *info = vma->vm_private_data;
/* info->screen_base is in System RAM */
void *screen_base = (void __force *) info->screen_base;

offset = (vaddr - vma->vm_start) + (vma->vm_pgoff << PAGE_SHIFT);
if (offset >= info->fix.smem_len)
return NOPAGE_SIGBUS;

page = vmalloc_to_page(info->screen_base + offset);
page = vmalloc_to_page(screen_base + offset);
if (!page)
return NOPAGE_OOM;

Expand Down

0 comments on commit 98a1153

Please sign in to comment.