lkml.org 
[lkml]   [2012]   [Mar]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/6] firmware_class: Split _request_firmware() into three functions
On 03/26/12 13:36, Rafael J. Wysocki wrote:
> On Monday, March 26, 2012, Stephen Boyd wrote:
>> On 03/25/12 15:01, Rafael J. Wysocki wrote:
>>> @@ -639,8 +655,15 @@ static int request_firmware_work_func(vo
>>> return 0;
>>> }
>>>
>>> - ret = _request_firmware(&fw, fw_work->name, fw_work->device,
>>> + ret = _request_firmware_prepare(&fw, fw_work->name, fw_work->device);
>>> + if (ret <= 0)
>>> + return ret;
>> This needs to jump to the cont function so that users know loading
>> failed or that the firmware was builtin.
> You're right, sorry. That should have been
>
> if (ret > 0) {
> ret = _request_firmware(fw, fw_work->name, fw_work->device,
> fw_work->uevent, true);
> if (ret)
> _request_firmware_cleanup(&fw);
> }
>
> but actually using a jump makes the next patch look better.
>
> Updated patch is appended.
> ---
> From: Rafael J. Wysocki <rjw@sisk.pl>
> Subject: firmware_class: Split _request_firmware() into three functions, v2
>
> Split _request_firmware() into three functions,
> _request_firmware_prepare() doing preparatory work that need not be
> done under umhelper_sem, _request_firmware_cleanup() doing the
> post-error cleanup and _request_firmware() carrying out the remaining
> operations.
>
> This change is requisite for moving the acquisition of umhelper_sem
> from _request_firmware() to the callers, which is going to be done
> subsequently.

Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>

> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
> ---

--
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.



\
 
 \ /
  Last update: 2012-03-27 23:39    [W:0.122 / U:0.400 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site