On Thu, Apr 21, 2011 at 04:20:36PM +0800, Bob Liu wrote:
> > on mmu systems do_mmap_pgoff contains a len = PAGE_ALIGN(len); line.
> > If we depend on this behavior, why not do it here as well and get rid
> > of the #ifdef?
> >
> 
> If do it in do_mmap_pgoff() the whole system will be effected, I am
> not sure whether
> it's correct and needed for other subsystem.

With "here" I was referring to uvc_queue_mmap.

> >> +     addr = (unsigned long)queue->mem + buffer->buf.m.offset;
> >> +     ret = addr;
> >
> > Why the intermediate step using addr?
> >
> 
> If don't return addr, do_mmap_pgoff() will return failure and we can't
> setup vma correctly.
> See mm/nommu.c line 1386(add = file->f_op->get_unmmapped_area() ).

I know, but why not do
        ret = (unsigned long)queue->mem + buffer->buf.m.offset;
instead?

  Daniel
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to