stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: ohad@wizery.com, linux-remoteproc@vger.kernel.org,
	linux-arm-msm@vger.kernel.org, bgoswami@codeaurora.org,
	linux-kernel@vger.kernel.org, rohkumar@qti.qualcomm.com,
	stable@vger.kernel.org
Subject: Re: [PATCH] rpmsg: smd: do not use mananged resources for endpoints and channels
Date: Sun, 3 Jun 2018 17:49:40 -0700	[thread overview]
Message-ID: <20180604004940.GA3206@builder> (raw)
In-Reply-To: <20180601233231.11230-1-srinivas.kandagatla@linaro.org>

On Fri 01 Jun 16:32 PDT 2018, Srinivas Kandagatla wrote:
> @@ -1380,11 +1380,13 @@ static void qcom_smd_edge_release(struct device *dev)
>  {
>  	struct qcom_smd_channel *channel;
>  	struct qcom_smd_edge *edge = to_smd_edge(dev);
> +	struct list_head *this, *tmp;
>  
> -	list_for_each_entry(channel, &edge->channels, list) {
> -		SET_RX_CHANNEL_INFO(channel, state, SMD_CHANNEL_CLOSED);
> -		SET_RX_CHANNEL_INFO(channel, head, 0);
> -		SET_RX_CHANNEL_INFO(channel, tail, 0);
> +	list_for_each_safe(this, tmp, &edge->channels) {
> +		channel = list_entry(this, struct qcom_smd_channel, list);

Is there a reason not to use list_for_each_entry_safe()?

> +		list_del(&channel->list);
> +		kfree(channel->name);
> +		kfree(channel);

Regards,
Bjorn

  reply	other threads:[~2018-06-04  0:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-01 23:32 [PATCH] rpmsg: smd: do not use mananged resources for endpoints and channels Srinivas Kandagatla
2018-06-04  0:49 ` Bjorn Andersson [this message]
2018-06-04  9:16   ` Srinivas Kandagatla

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=20180604004940.GA3206@builder \
    --to=bjorn.andersson@linaro.org \
    --cc=bgoswami@codeaurora.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=ohad@wizery.com \
    --cc=rohkumar@qti.qualcomm.com \
    --cc=srinivas.kandagatla@linaro.org \
    --cc=stable@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).