lkml.org 
[lkml]   [2013]   [Sep]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/5] iio: adc: remove unnecessary work pending test
ccing Michael Hennerich and Lars-Peter Clausen,

On 09/06/13 16:20, Tejun Heo wrote:
> On Fri, Sep 06, 2013 at 07:02:34PM +0800, Xie XiuQi wrote:
>> Remove unnecessary work pending test before calling schedule_work().
>> It has been tested in queue_work_on() already. No functional changed.
>>
>> Signed-off-by: Xie XiuQi <xiexiuqi@huawei.com>
>> Cc: Tejun Heo <tj@kernel.org>
>
> Reviewed-by: Tejun Heo <tj@kernel.org>
>
> One nit below tho.
>
>> - if (iio_buffer_enabled(indio_dev)) {
>> - if (!work_pending(&st->poll_work))
>> - schedule_work(&st->poll_work);
>> - } else {
>> + if (iio_buffer_enabled(indio_dev))
>> + schedule_work(&st->poll_work);
>> + else {
>> st->done = true;
>> wake_up_interruptible(&st->wq_data_avail);
>> }
>
> Please don't drop the parentheses. The convention is to have either
> both or none on if/else.

I'll fix this up on applying if everyone is happy (can't see why the
won't be, but best to check!) Michael is clearly given as the author of driver
so should probably have been in the cc list. Whilst I might apply this directly
as maintainer I much prefer if I get an ack from the driver author as if nothing
else it gives me a warm fuzzy feeling ;)

Also patch title should mention that a) this is a staging driver, b) which adc driver it
applies to. I'll fix that up as well on applying it.

Thanks for the patch though, it would probably never have been noticed otherwise!

>
> Thanks.
>


\
 
 \ /
  Last update: 2013-09-07 22:01    [W:0.078 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site