Linux Remote Processor Subsystem development
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: Loic Pallardy <loic.pallardy@st.com>
Cc: bjorn.andersson@linaro.org, ohad@wizery.com,
	linux-remoteproc@vger.kernel.org, kernel@stlinux.com,
	patrice.chotard@st.com
Subject: Re: [PATCH v2 1/1] rpmsg: virtio_rpmsg_bus: fix channel creation
Date: Tue, 10 Jan 2017 07:51:07 +0000	[thread overview]
Message-ID: <20170110075107.GC2155@dell> (raw)
In-Reply-To: <1481813396-1529-1-git-send-email-loic.pallardy@st.com>

On Thu, 15 Dec 2016, Loic Pallardy wrote:

> Since commit 4dffed5b3ac796b ("rpmsg: Name rpmsg devices based on
> channel id"), it is no more possible for a firmware to register twice
> a service (on different endpoints). rpmsg_register_device function
> is failing when calling device_add for the second time as second
> device has the same name as first one already register.
> It is because name is based only on service name and so is not more
> unique. Previously name was unique thanks to the use of rpmsg_dev_index.
> 
> This patch adds destination and source endpoint numbers device name to
> create an unique identifier.
> 
> Signed-off-by: Loic Pallardy <loic.pallardy@st.com>
> ---
> v2: Update commit header with commit ID generating regression
> Fix rpmsg_core instead of virtio_rpmsg
> 
>  drivers/rpmsg/rpmsg_core.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Acked-by: Lee Jones <lee.jones@linaro.org>

> diff --git a/drivers/rpmsg/rpmsg_core.c b/drivers/rpmsg/rpmsg_core.c
> index a79cb5a..18c73e0 100644
> --- a/drivers/rpmsg/rpmsg_core.c
> +++ b/drivers/rpmsg/rpmsg_core.c
> @@ -453,8 +453,8 @@ int rpmsg_register_device(struct rpmsg_device *rpdev)
>  	struct device *dev = &rpdev->dev;
>  	int ret;
>  
> -	dev_set_name(&rpdev->dev, "%s:%s",
> -		     dev_name(dev->parent), rpdev->id.name);
> +	dev_set_name(&rpdev->dev, "%s.%d.%d.%s", dev_name(dev->parent),
> +		     rpdev->src, rpdev->dst, rpdev->id.name);
>  
>  	rpdev->dev.bus = &rpmsg_bus;
>  	rpdev->dev.release = rpmsg_release_device;

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

  parent reply	other threads:[~2017-01-10  7:51 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-15 14:49 [PATCH v2 1/1] rpmsg: virtio_rpmsg_bus: fix channel creation Loic Pallardy
2016-12-16  5:09 ` Bjorn Andersson
2016-12-27 22:36   ` Suman Anna
2016-12-30 19:56     ` Bjorn Andersson
2017-01-09 23:45       ` Bjorn Andersson
2017-01-10  0:47         ` Suman Anna
2017-01-11 19:57           ` Bjorn Andersson
2017-01-10  8:18         ` Loic PALLARDY
2017-01-11 22:08           ` Bjorn Andersson
2016-12-16 10:39 ` [STLinux Kernel] " Peter Griffin
2017-01-10  7:51 ` Lee Jones [this message]
2017-01-10  8:05   ` Marek Novak

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=20170110075107.GC2155@dell \
    --to=lee.jones@linaro.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=kernel@stlinux.com \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=loic.pallardy@st.com \
    --cc=ohad@wizery.com \
    --cc=patrice.chotard@st.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