mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Arnaud Pouliquen <arnaud.pouliquen@st.com>
To: Alex Elder <elder@linaro.org>, <ohad@wizery.com>,
	<bjorn.andersson@linaro.org>
Cc: <linux-remoteproc@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 5/5] remoteproc: Introduce prepare and unprepare for subdevices
Date: Tue, 29 May 2018 14:31:08 +0200	[thread overview]
Message-ID: <b0bc8d99-2067-4ce0-fa36-3ac4d14d7b3c@st.com> (raw)
In-Reply-To: <d2d120c3-a875-7feb-00a9-e8e4d3e4dfbe@linaro.org>



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

  reply	other threads:[~2018-05-29 12:31 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-15 20:53 [PATCH 0/5] remoteproc: updates for new events Alex Elder
2018-05-15 20:53 ` [PATCH 1/5] remoteproc: Rename subdev functions to start/stop Alex Elder
2018-05-15 20:53 ` [PATCH 2/5] remoteproc: Make start and stop in subdev optional Alex Elder
2018-05-15 20:53 ` [PATCH 3/5] remoteproc: Make client initialize ops in rproc_subdev Alex Elder
2018-05-15 20:53 ` [PATCH 4/5] remoteproc: rename subdev probe and remove functions Alex Elder
2018-05-29  9:12   ` Arnaud Pouliquen
2018-05-29 11:53     ` Alex Elder
2018-06-26  1:32       ` Alex Elder
2018-06-26  2:20         ` Bjorn Andersson
2018-05-15 20:53 ` [PATCH 5/5] remoteproc: Introduce prepare and unprepare for subdevices Alex Elder
2018-05-29  9:16   ` Arnaud Pouliquen
2018-05-29 11:51     ` Alex Elder
2018-05-29 12:31       ` Arnaud Pouliquen [this message]
2018-05-29 15:26   ` Arnaud Pouliquen
2018-05-29 15:30     ` Fabien DESSENNE
2018-05-29 15:31       ` Alex Elder
2018-05-29 15:44         ` Fabien DESSENNE

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b0bc8d99-2067-4ce0-fa36-3ac4d14d7b3c@st.com \
    --to=arnaud.pouliquen@st.com \
    --cc=bjorn.andersson@linaro.org \
    --cc=elder@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=ohad@wizery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®