public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: "Daniel Glöckner" <daniel-gl@gmx.net>
To: Bob Liu <lliubbo@gmail.com>
Cc: linux-media@vger.kernel.org, dhowells@redhat.com,
	linux-uvc-devel@lists.berlios.de, mchehab@redhat.com,
	hverkuil@xs4all.nl, laurent.pinchart@ideasonboard.com,
	sakari.ailus@maxwell.research.nokia.com,
	martin_rubli@logitech.com, jarod@redhat.com, tj@kernel.org,
	arnd@arndb.de, fweisbec@gmail.com, agust@denx.de, gregkh@suse.de,
	vapier@gentoo.org
Subject: Re: [PATCH v3] media:uvc_driver: add uvc support on no-mmu arch
Date: Thu, 21 Apr 2011 11:47:43 +0200	[thread overview]
Message-ID: <20110421094743.GA8503@minime.bse> (raw)
In-Reply-To: <BANLkTimHX8aYoeSU1ES0Tw0Swaz9xYLt=Q@mail.gmail.com>

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

  reply	other threads:[~2011-04-21  9:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-21  3:17 [PATCH v3] media:uvc_driver: add uvc support on no-mmu arch Bob Liu
2011-04-21  7:59 ` Daniel Glöckner
2011-04-21  8:20   ` Bob Liu
2011-04-21  9:47     ` Daniel Glöckner [this message]
2011-04-21  9:57       ` Bob Liu
2011-04-21 10:06         ` Daniel Glöckner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110421094743.GA8503@minime.bse \
    --to=daniel-gl@gmx.net \
    --cc=agust@denx.de \
    --cc=arnd@arndb.de \
    --cc=dhowells@redhat.com \
    --cc=fweisbec@gmail.com \
    --cc=gregkh@suse.de \
    --cc=hverkuil@xs4all.nl \
    --cc=jarod@redhat.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-uvc-devel@lists.berlios.de \
    --cc=lliubbo@gmail.com \
    --cc=martin_rubli@logitech.com \
    --cc=mchehab@redhat.com \
    --cc=sakari.ailus@maxwell.research.nokia.com \
    --cc=tj@kernel.org \
    --cc=vapier@gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox