All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Edgar Thier <info@edgarthier.net>
Cc: Kieran Bingham <kieran.bingham@ideasonboard.com>,
	linux-media@vger.kernel.org
Subject: Re: [PATCH] uvcvideo: Apply flags from device to actual properties
Date: Wed, 03 Jan 2018 12:57:30 +0200	[thread overview]
Message-ID: <24839161.SxonQjYASC@avalon> (raw)
In-Reply-To: <c95024db-c6f8-f346-07f7-d99acf05cd00@edgarthier.net>

Hi Edgar,

On Wednesday, 3 January 2018 08:07:44 EET Edgar Thier wrote:
> Hi Emmanuel,

If we pick names randomly I'll call you David :-)

> >>> +	int flags = 0;
> >>> +
> >>> +	data = kmalloc(2, GFP_KERNEL);
> > 
> > Isn't 1 byte enough ?
> 
> To quote from Kieran further up this thread:
> 
> >> kmalloc seems a bit of an overhead for 2 bytes (only one of which is
> >> used). Can this use local stack storage?
> >> 
> >> (Laurent, looks like you originally wrote the code that did that, was
> >> there a reason for the kmalloc for 2 bytes?)
> > 
> > Aha - OK, Just spoke with Laurent and - yes this is needed, as we can't
> > DMA to the stack  - I hadn't realised the 'data' was being DMA'd ..

I don't dispute the fact that we need to kmalloc the memory, but I think we 
only need to kmalloc one byte, not two. The existing 2 bytes allocation comes 
from the size of the GET_LEN reply. Now that you only issue a GET_INFO here, 
one byte is enough.

> >> All these are small issues. Let me try to address them, I'll send you an
> >> updated patch shortly.
> 
> I'll be waiting.

-- 
Regards,

Laurent Pinchart

  reply	other threads:[~2018-01-03 10:57 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-15 10:59 [PATCH] uvcvideo: Apply flags from device to actual properties Edgar Thier
2017-08-16 14:58 ` Laurent Pinchart
2017-08-18 10:12   ` Edgar Thier
2017-10-05  9:23     ` Edgar Thier
2017-10-05  9:43     ` Kieran Bingham
2017-10-05 11:05       ` Kieran Bingham
2017-10-06 10:34         ` Edgar Thier
2017-10-09  8:28           ` Kieran Bingham
2017-10-11 11:56             ` Edgar Thier
2017-10-11 12:21               ` Kieran Bingham
2017-10-12  7:54                 ` Edgar Thier
2017-11-15  8:11                   ` Edgar Thier
2017-11-15 11:53                     ` Kieran Bingham
2017-11-15 12:01                       ` Edgar Thier
2017-11-15 11:54                   ` Kieran Bingham
2017-12-15  7:07                     ` Edgar Thier
2018-01-02 20:07                   ` Laurent Pinchart
2018-01-02 23:33                     ` Laurent Pinchart
2018-01-03  6:07                       ` Edgar Thier
2018-01-03 10:57                         ` Laurent Pinchart [this message]
2017-10-06 10:33       ` Edgar Thier
  -- strict thread matches above, loose matches on Subject: below --
2018-01-03 10:59 Laurent Pinchart

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=24839161.SxonQjYASC@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=info@edgarthier.net \
    --cc=kieran.bingham@ideasonboard.com \
    --cc=linux-media@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.