public inbox for linux-remoteproc@vger.kernel.org
 help / color / mirror / Atom feed
From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: Wei Yongjun <weiyongjun1@huawei.com>
Cc: Ohad Ben-Cohen <ohad@wizery.com>, linux-remoteproc@vger.kernel.org
Subject: Re: [PATCH -next] rpmsg: glink: Fix missing mutex_init() in qcom_glink_alloc_channel()
Date: Tue, 2 Jan 2018 09:23:37 -0800	[thread overview]
Message-ID: <20180102172337.GW17344@builder> (raw)
In-Reply-To: <1514893623-70432-1-git-send-email-weiyongjun1@huawei.com>

On Tue 02 Jan 03:47 PST 2018, Wei Yongjun wrote:

> qcom_glink_alloc_channel() allocates the mutex but not initialize it.
> Use mutex_init() on it to initialize it correctly.
> 
> This is detected by Coccinelle semantic patch.
> 
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>

Thanks Wei, applied.

Regards,
Bjorn

> ---
>  drivers/rpmsg/qcom_glink_native.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/rpmsg/qcom_glink_native.c b/drivers/rpmsg/qcom_glink_native.c
> index 40d76d2..e0f31ed 100644
> --- a/drivers/rpmsg/qcom_glink_native.c
> +++ b/drivers/rpmsg/qcom_glink_native.c
> @@ -221,6 +221,7 @@ static struct glink_channel *qcom_glink_alloc_channel(struct qcom_glink *glink,
>  	/* Setup glink internal glink_channel data */
>  	spin_lock_init(&channel->recv_lock);
>  	spin_lock_init(&channel->intent_lock);
> +	mutex_init(&channel->intent_req_lock);
>  
>  	channel->glink = glink;
>  	channel->name = kstrdup(name, GFP_KERNEL);
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-remoteproc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

      reply	other threads:[~2018-01-02 17:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-02 11:47 [PATCH -next] rpmsg: glink: Fix missing mutex_init() in qcom_glink_alloc_channel() Wei Yongjun
2018-01-02 17:23 ` Bjorn Andersson [this message]

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=20180102172337.GW17344@builder \
    --to=bjorn.andersson@linaro.org \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=ohad@wizery.com \
    --cc=weiyongjun1@huawei.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