[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b0bc8d99-2067-4ce0-fa36-3ac4d14d7b3c@st.com>
Date: Tue, 29 May 2018 14:31:08 +0200
From: Arnaud Pouliquen <arnaud.pouliquen@...com>
To: Alex Elder <elder@...aro.org>, <ohad@...ery.com>,
<bjorn.andersson@...aro.org>
CC: <linux-remoteproc@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 5/5] remoteproc: Introduce prepare and unprepare for
subdevices
On 05/29/2018 01:51 PM, Alex Elder wrote:
> On 05/29/2018 04:16 AM, Arnaud Pouliquen wrote:
> . . .
>
>>> +unroll_preparation:
>>> + list_for_each_entry_continue_reverse(subdev, &rproc->subdevs, node) {
>>> + if (subdev->unprepare)
>>> + subdev->unprepare(subdev);
>>> + }
>> Here you could call rproc_unprepare_subdevices instead of duplicating
>> the code.
>
> I thought the same thing, but it won't work because we only want to
> unprepare those devices that were successfully prepared. Here we are
> unwinding the work that was partially done; in rproc_unprepare_subdevices()
> *all* subdevices have their unprepare function called.
You right, i missed the "continue"... new for me as i never used it,
thank for teaching!
Arnaud
Powered by blists - more mailing lists