From: Ezequiel <elezegarcia@gmail.com>
To: Hans de Goede <hdegoede@redhat.com>
Cc: linux-media@vger.kernel.org, moinejf@free.fr
Subject: Re: [PATCH] [media] gspca: replaced static allocation by video_device_alloc/video_device_release
Date: Sat, 19 Nov 2011 16:40:37 -0300 [thread overview]
Message-ID: <20111119194037.GA3709@localhost> (raw)
In-Reply-To: <4EC80176.5000802@redhat.com>
On Sat, Nov 19, 2011 at 08:20:22PM +0100, Hans de Goede wrote:
> Hi,
>
> On 11/19/2011 07:50 PM, Ezequiel wrote:
> > Pushed video_device initialization into a separate function.
> > Replaced static allocation of struct video_device by
> > video_device_alloc/video_device_release usage.
>
> NACK! I see a video_device_release call here, but not a
> video_device_alloc, also you're messing with quite sensitive code
> here (because a usb device can be unplugged at any time, including
> when the /dev/video node is open by a process), and changing it
> from static to dynamic allocation my have more consequences
> then you see at first (I did not analyze all the code paths
> for the proposed change, since the last time I audited them for
> the current static allocation of the videodevice struct code took
> me hours).
>
> Also static allocation (as part of the driver struct) in general is
> better then dynamic as it needs less code and helps avoiding memory
> fragmentation.
>
> All in all I cannot help but feel that you're diving into a piece
> of code with some drive by shooting style patch without knowing
> the code in question at all, please don't do that!
>
> Regards,
>
> Hans
>
Hi Hans,
Sorry, really dont know what happened,
I sent an incomplete patch version.
(some vim yank-key error).
I understand your observations about static vs dynamic,
but please could you review the right patch.
Thanks,
Ezequiel.
prev parent reply other threads:[~2011-11-19 19:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-19 18:50 [PATCH] [media] gspca: replaced static allocation by video_device_alloc/video_device_release Ezequiel
2011-11-19 19:20 ` Hans de Goede
2011-11-19 19:40 ` Ezequiel [this message]
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=20111119194037.GA3709@localhost \
--to=elezegarcia@gmail.com \
--cc=hdegoede@redhat.com \
--cc=linux-media@vger.kernel.org \
--cc=moinejf@free.fr \
/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.