lkml.org 
[lkml]   [2019]   [Jul]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [alsa-devel] [RFC PATCH 33/40] soundwire: intel: Add basic power management support
From
Date


On 7/26/19 5:50 AM, Cezary Rojewski wrote:
> On 2019-07-26 01:40, Pierre-Louis Bossart wrote:
>> +static int intel_resume(struct device *dev)
>> +{
>> +    struct sdw_intel *sdw;
>> +    int ret;
>> +
>> +    sdw = dev_get_drvdata(dev);
>> +
>> +    ret = intel_init(sdw);
>> +    if (ret) {
>> +        dev_err(dev, "%s failed: %d", __func__, ret);
>> +        return ret;
>> +    }
>> +
>> +    sdw_cdns_enable_interrupt(&sdw->cdns);
>> +
>> +    return ret;
>> +}
>> +
>> +#endif
>
> Suggestion: the local declaration + initialization via dev_get_drvdata()
> are usually combined.

yes, will do.

>
> Given the upstream declaration of _enable_interrupt, it does return
> error code/ success. Given current flow, if function gets to
> _enable_interrupt call, ret is already set to 0. Returning
> sdw_cds_enable_interrupt() directly would both simplify the definition
> and prevent status loss.

sounds good, will do, thanks!

\
 
 \ /
  Last update: 2019-07-26 16:58    [W:0.171 / U:39.396 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site