linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] remoteproc: Move rproc_delete_debug_dir() to rproc_del()
@ 2017-01-24  1:48 Sarangdhar Joshi
  2017-01-30 22:01 ` Bjorn Andersson
  0 siblings, 1 reply; 3+ messages in thread
From: Sarangdhar Joshi @ 2017-01-24  1:48 UTC (permalink / raw)
  To: linux-arm-kernel

The "remoteproc{0,1...}" sysfs entries are added in
rproc_add() and deleted in rproc_type_release() instead of
in rproc_del(). That leaves these lingering entries sticking
around after we return from rproc_del(). Move the
rproc_delete_debug_dir() to rproc_del() to fix this.

Signed-off-by: Sarangdhar Joshi <spjoshi@codeaurora.org>
---
 drivers/remoteproc/remoteproc_core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c
index 953ee29..78200a7 100644
--- a/drivers/remoteproc/remoteproc_core.c
+++ b/drivers/remoteproc/remoteproc_core.c
@@ -1315,8 +1315,6 @@ static void rproc_type_release(struct device *dev)
 
 	dev_info(&rproc->dev, "releasing %s\n", rproc->name);
 
-	rproc_delete_debug_dir(rproc);
-
 	idr_destroy(&rproc->notifyids);
 
 	if (rproc->index >= 0)
@@ -1491,6 +1489,8 @@ int rproc_del(struct rproc *rproc)
 	if (rproc->auto_boot)
 		rproc_shutdown(rproc);
 
+	rproc_delete_debug_dir(rproc);
+
 	/* the rproc is downref'ed as soon as it's removed from the klist */
 	mutex_lock(&rproc_list_mutex);
 	list_del(&rproc->node);
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH] remoteproc: Move rproc_delete_debug_dir() to rproc_del()
  2017-01-24  1:48 [PATCH] remoteproc: Move rproc_delete_debug_dir() to rproc_del() Sarangdhar Joshi
@ 2017-01-30 22:01 ` Bjorn Andersson
  2017-01-30 22:13   ` Bjorn Andersson
  0 siblings, 1 reply; 3+ messages in thread
From: Bjorn Andersson @ 2017-01-30 22:01 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon 23 Jan 17:48 PST 2017, Sarangdhar Joshi wrote:

> The "remoteproc{0,1...}" sysfs entries are added in
> rproc_add() and deleted in rproc_type_release() instead of
> in rproc_del(). That leaves these lingering entries sticking
> around after we return from rproc_del(). Move the
> rproc_delete_debug_dir() to rproc_del() to fix this.
> 
> Signed-off-by: Sarangdhar Joshi <spjoshi@codeaurora.org>

I moved the rproc_delete_debug_dir() below the list_del() region to
allow reuse of the critical region in the upcoming "deleted" patch.

Applied, thank you.

Regards,
Bjorn

> ---
>  drivers/remoteproc/remoteproc_core.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c
> index 953ee29..78200a7 100644
> --- a/drivers/remoteproc/remoteproc_core.c
> +++ b/drivers/remoteproc/remoteproc_core.c
> @@ -1315,8 +1315,6 @@ static void rproc_type_release(struct device *dev)
>  
>  	dev_info(&rproc->dev, "releasing %s\n", rproc->name);
>  
> -	rproc_delete_debug_dir(rproc);
> -
>  	idr_destroy(&rproc->notifyids);
>  
>  	if (rproc->index >= 0)
> @@ -1491,6 +1489,8 @@ int rproc_del(struct rproc *rproc)
>  	if (rproc->auto_boot)
>  		rproc_shutdown(rproc);
>  
> +	rproc_delete_debug_dir(rproc);
> +
>  	/* the rproc is downref'ed as soon as it's removed from the klist */
>  	mutex_lock(&rproc_list_mutex);
>  	list_del(&rproc->node);
> -- 
> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
> a Linux Foundation Collaborative Project
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] remoteproc: Move rproc_delete_debug_dir() to rproc_del()
  2017-01-30 22:01 ` Bjorn Andersson
@ 2017-01-30 22:13   ` Bjorn Andersson
  0 siblings, 0 replies; 3+ messages in thread
From: Bjorn Andersson @ 2017-01-30 22:13 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon 30 Jan 14:01 PST 2017, Bjorn Andersson wrote:

> On Mon 23 Jan 17:48 PST 2017, Sarangdhar Joshi wrote:
> 
> > The "remoteproc{0,1...}" sysfs entries are added in
> > rproc_add() and deleted in rproc_type_release() instead of
> > in rproc_del(). That leaves these lingering entries sticking
> > around after we return from rproc_del(). Move the
> > rproc_delete_debug_dir() to rproc_del() to fix this.
> > 
> > Signed-off-by: Sarangdhar Joshi <spjoshi@codeaurora.org>
> 
> I moved the rproc_delete_debug_dir() below the list_del() region to
> allow reuse of the critical region in the upcoming "deleted" patch.
> 

Never mind, I failed at reading. I re-applied this as is.

Regards,
Bjorn

> Applied, thank you.
> 
> Regards,
> Bjorn
> 
> > ---
> >  drivers/remoteproc/remoteproc_core.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c
> > index 953ee29..78200a7 100644
> > --- a/drivers/remoteproc/remoteproc_core.c
> > +++ b/drivers/remoteproc/remoteproc_core.c
> > @@ -1315,8 +1315,6 @@ static void rproc_type_release(struct device *dev)
> >  
> >  	dev_info(&rproc->dev, "releasing %s\n", rproc->name);
> >  
> > -	rproc_delete_debug_dir(rproc);
> > -
> >  	idr_destroy(&rproc->notifyids);
> >  
> >  	if (rproc->index >= 0)
> > @@ -1491,6 +1489,8 @@ int rproc_del(struct rproc *rproc)
> >  	if (rproc->auto_boot)
> >  		rproc_shutdown(rproc);
> >  
> > +	rproc_delete_debug_dir(rproc);
> > +
> >  	/* the rproc is downref'ed as soon as it's removed from the klist */
> >  	mutex_lock(&rproc_list_mutex);
> >  	list_del(&rproc->node);
> > -- 
> > The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
> > a Linux Foundation Collaborative Project
> > 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-01-30 22:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-24  1:48 [PATCH] remoteproc: Move rproc_delete_debug_dir() to rproc_del() Sarangdhar Joshi
2017-01-30 22:01 ` Bjorn Andersson
2017-01-30 22:13   ` Bjorn Andersson

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).