LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH v2] hwspinlock: ignore disabled device
@ 2019-03-08 16:53 Fabien Dessenne
  2019-05-13  9:08 ` Fabien DESSENNE
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Fabien Dessenne @ 2019-03-08 16:53 UTC (permalink / raw)
  To: Ohad Ben-Cohen, Bjorn Andersson, linux-remoteproc, linux-kernel
  Cc: Fabien Dessenne, Benjamin Gaignard

Do not wait for hwspinlock device registration if it is not available
for use.

Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com>
---
V2: use 'goto out' instead of 'return'

 drivers/hwspinlock/hwspinlock_core.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/hwspinlock/hwspinlock_core.c b/drivers/hwspinlock/hwspinlock_core.c
index 2bad40d..d806307 100644
--- a/drivers/hwspinlock/hwspinlock_core.c
+++ b/drivers/hwspinlock/hwspinlock_core.c
@@ -333,6 +333,11 @@ int of_hwspin_lock_get_id(struct device_node *np, int index)
 	if (ret)
 		return ret;
 
+	if (!of_device_is_available(args.np)) {
+		ret = -ENOENT;
+		goto out;
+	}
+
 	/* Find the hwspinlock device: we need its base_id */
 	ret = -EPROBE_DEFER;
 	rcu_read_lock();
-- 
2.7.4


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

* Re: [PATCH v2] hwspinlock: ignore disabled device
  2019-03-08 16:53 [PATCH v2] hwspinlock: ignore disabled device Fabien Dessenne
@ 2019-05-13  9:08 ` Fabien DESSENNE
  2019-05-31 14:02 ` Suman Anna
  2019-06-29 19:05 ` Bjorn Andersson
  2 siblings, 0 replies; 4+ messages in thread
From: Fabien DESSENNE @ 2019-05-13  9:08 UTC (permalink / raw)
  To: Ohad Ben-Cohen, Bjorn Andersson, linux-remoteproc, linux-kernel
  Cc: Benjamin GAIGNARD, Fabien DESSENNE

Hi


Gentle reminder


Fabien

On 08/03/2019 5:53 PM, Fabien Dessenne wrote:
> Do not wait for hwspinlock device registration if it is not available
> for use.
>
> Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com>
> ---
> V2: use 'goto out' instead of 'return'
>
>   drivers/hwspinlock/hwspinlock_core.c | 5 +++++
>   1 file changed, 5 insertions(+)
>
> diff --git a/drivers/hwspinlock/hwspinlock_core.c b/drivers/hwspinlock/hwspinlock_core.c
> index 2bad40d..d806307 100644
> --- a/drivers/hwspinlock/hwspinlock_core.c
> +++ b/drivers/hwspinlock/hwspinlock_core.c
> @@ -333,6 +333,11 @@ int of_hwspin_lock_get_id(struct device_node *np, int index)
>   	if (ret)
>   		return ret;
>   
> +	if (!of_device_is_available(args.np)) {
> +		ret = -ENOENT;
> +		goto out;
> +	}
> +
>   	/* Find the hwspinlock device: we need its base_id */
>   	ret = -EPROBE_DEFER;
>   	rcu_read_lock();

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

* Re: [PATCH v2] hwspinlock: ignore disabled device
  2019-03-08 16:53 [PATCH v2] hwspinlock: ignore disabled device Fabien Dessenne
  2019-05-13  9:08 ` Fabien DESSENNE
@ 2019-05-31 14:02 ` Suman Anna
  2019-06-29 19:05 ` Bjorn Andersson
  2 siblings, 0 replies; 4+ messages in thread
From: Suman Anna @ 2019-05-31 14:02 UTC (permalink / raw)
  To: Fabien Dessenne, Ohad Ben-Cohen, Bjorn Andersson,
	linux-remoteproc, linux-kernel
  Cc: Benjamin Gaignard

On 3/8/19 10:53 AM, Fabien Dessenne wrote:
> Do not wait for hwspinlock device registration if it is not available
> for use.
> 
> Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com>

Acked-by: Suman Anna <s-anna@ti.com>

> ---
> V2: use 'goto out' instead of 'return'
> 
>  drivers/hwspinlock/hwspinlock_core.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/hwspinlock/hwspinlock_core.c b/drivers/hwspinlock/hwspinlock_core.c
> index 2bad40d..d806307 100644
> --- a/drivers/hwspinlock/hwspinlock_core.c
> +++ b/drivers/hwspinlock/hwspinlock_core.c
> @@ -333,6 +333,11 @@ int of_hwspin_lock_get_id(struct device_node *np, int index)
>  	if (ret)
>  		return ret;
>  
> +	if (!of_device_is_available(args.np)) {
> +		ret = -ENOENT;
> +		goto out;
> +	}
> +
>  	/* Find the hwspinlock device: we need its base_id */
>  	ret = -EPROBE_DEFER;
>  	rcu_read_lock();
> 


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

* Re: [PATCH v2] hwspinlock: ignore disabled device
  2019-03-08 16:53 [PATCH v2] hwspinlock: ignore disabled device Fabien Dessenne
  2019-05-13  9:08 ` Fabien DESSENNE
  2019-05-31 14:02 ` Suman Anna
@ 2019-06-29 19:05 ` Bjorn Andersson
  2 siblings, 0 replies; 4+ messages in thread
From: Bjorn Andersson @ 2019-06-29 19:05 UTC (permalink / raw)
  To: Fabien Dessenne
  Cc: Ohad Ben-Cohen, linux-remoteproc, linux-kernel, Benjamin Gaignard

On Fri 08 Mar 08:53 PST 2019, Fabien Dessenne wrote:

> Do not wait for hwspinlock device registration if it is not available
> for use.
> 
> Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com>

Applied with Suman's ack

Thanks,
Bjorn

> ---
> V2: use 'goto out' instead of 'return'
> 
>  drivers/hwspinlock/hwspinlock_core.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/hwspinlock/hwspinlock_core.c b/drivers/hwspinlock/hwspinlock_core.c
> index 2bad40d..d806307 100644
> --- a/drivers/hwspinlock/hwspinlock_core.c
> +++ b/drivers/hwspinlock/hwspinlock_core.c
> @@ -333,6 +333,11 @@ int of_hwspin_lock_get_id(struct device_node *np, int index)
>  	if (ret)
>  		return ret;
>  
> +	if (!of_device_is_available(args.np)) {
> +		ret = -ENOENT;
> +		goto out;
> +	}
> +
>  	/* Find the hwspinlock device: we need its base_id */
>  	ret = -EPROBE_DEFER;
>  	rcu_read_lock();
> -- 
> 2.7.4
> 

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

end of thread, other threads:[~2019-06-29 19:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-08 16:53 [PATCH v2] hwspinlock: ignore disabled device Fabien Dessenne
2019-05-13  9:08 ` Fabien DESSENNE
2019-05-31 14:02 ` Suman Anna
2019-06-29 19:05 ` 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).