Re: [PATCH 1/8] [media] em28xx: fix em28xx-input removal

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am 20.12.2014 um 15:51 schrieb Russell King - ARM Linux:
> On Sat, Dec 20, 2014 at 03:11:54PM +0100, Frank Schäfer wrote:
>> Hi Russel,
> I guess you won't mind if I mis-spell your name too...

Wow... it seems to be very easy to offend you...
Sorry, that was definitely not my intention. I did not do this on purpose.
It was just a simple mistake and I will try to avoid it in the future.

>
>> I'd prefer to keep the button initialization related stuff together in
>> em28xx_init_buttons() and do the cancel_delayed_work_sync() only if we
>> have buttons (dev->num_button_polling_addresses).
>> That's how we already do it with the IR work struct (see
>> em28xx_ir_suspend()).
> Provided all places that touch buttons_query_work are properly updated
> that's fine, but to me that is fragile and asking for trouble.  It's far
> better to ensure that everything is properly initialised so you don't
> have to remember to conditionalise every single reference to a work
> struct.
>
> In any case, delayed work struct initialisation is cheap - it doesn't
> involve any additional memory, it only initialises the various members
> of the struct (and the lockdep information for the static key) so there
> really is no argument against always initialising delayed works or normal
> works, timers, etc to avoid these kinds of bugs.

Fair enough !

Regards,
Frank Schäfer

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



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux