lkml.org 
[lkml]   [2019]   [Apr]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] soundwire: fix pm_runtime_get_sync return code checks
Date


> On 5 Apr 2019, at 17:04, Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> wrote:
>
> On 4/5/19 2:26 AM, Jan Kotas wrote:
>>
>>
>> ret = pm_runtime_get_sync(slave->bus->dev);
>> - if (ret < 0)
>> + if (ret < 0 && ret != -EACCES)
>>
> There was a patch submitted on 3/28 by Srinivas Kandagatla who suggested an alternate solution for exactly the same code.
>
> + if (pm_runtime_enabled(slave->bus->dev)) {
> + ret = pm_runtime_get_sync(slave->bus->dev);
> + if (ret < 0)
> + return ret;
>
> I am far from an expert on pm_runtime but Srinivas' solution looks more elegant to me.

Hello Pierre,

Please take a look at this patch, that was my inspiration:
https://lists.linuxfoundation.org/pipermail/linux-pm/2011-June/031930.html

I also took a look, and it seems the value returned by
pm_runtime_get_syncis simply ignored in a lot of places,
so checking its value may be excessive.

Regards,
Jan
\
 
 \ /
  Last update: 2019-04-08 09:13    [W:0.099 / U:0.180 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site