All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] imx-common: rdc-sema: correct return value
@ 2017-04-21  8:56 Peng Fan
  2017-05-11 10:37 ` Stefano Babic
  0 siblings, 1 reply; 2+ messages in thread
From: Peng Fan @ 2017-04-21  8:56 UTC (permalink / raw)
  To: u-boot

When unlock, if caller is not the sema owner,
return -EACCES, not 1.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
---
 arch/arm/imx-common/rdc-sema.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/imx-common/rdc-sema.c b/arch/arm/imx-common/rdc-sema.c
index 5df4e02..1d97ac8 100644
--- a/arch/arm/imx-common/rdc-sema.c
+++ b/arch/arm/imx-common/rdc-sema.c
@@ -94,7 +94,7 @@ int imx_rdc_sema_unlock(int per_id)
 
 	reg = readb(&imx_rdc_sema->gate[per_id % SEMA_GATES_NUM]);
 	if ((reg & RDC_SEMA_GATE_GTFSM_MASK) != RDC_SEMA_PROC_ID)
-		return 1;	/*Not the semaphore owner */
+		return -EACCES;	/*Not the semaphore owner */
 
 	writeb(0x0, &imx_rdc_sema->gate[per_id % SEMA_GATES_NUM]);
 
-- 
2.6.2

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

* [U-Boot] [PATCH] imx-common: rdc-sema: correct return value
  2017-04-21  8:56 [U-Boot] [PATCH] imx-common: rdc-sema: correct return value Peng Fan
@ 2017-05-11 10:37 ` Stefano Babic
  0 siblings, 0 replies; 2+ messages in thread
From: Stefano Babic @ 2017-05-11 10:37 UTC (permalink / raw)
  To: u-boot

On 21/04/2017 10:56, Peng Fan wrote:
> When unlock, if caller is not the sema owner,
> return -EACCES, not 1.
> 
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> Cc: Stefano Babic <sbabic@denx.de>
> ---
>  arch/arm/imx-common/rdc-sema.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm/imx-common/rdc-sema.c b/arch/arm/imx-common/rdc-sema.c
> index 5df4e02..1d97ac8 100644
> --- a/arch/arm/imx-common/rdc-sema.c
> +++ b/arch/arm/imx-common/rdc-sema.c
> @@ -94,7 +94,7 @@ int imx_rdc_sema_unlock(int per_id)
>  
>  	reg = readb(&imx_rdc_sema->gate[per_id % SEMA_GATES_NUM]);
>  	if ((reg & RDC_SEMA_GATE_GTFSM_MASK) != RDC_SEMA_PROC_ID)
> -		return 1;	/*Not the semaphore owner */
> +		return -EACCES;	/*Not the semaphore owner */
>  
>  	writeb(0x0, &imx_rdc_sema->gate[per_id % SEMA_GATES_NUM]);
>  
> 

Applied to u-boot-imx, thanks !

Best regards,
Stefano Babic


-- 
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================

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

end of thread, other threads:[~2017-05-11 10:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-21  8:56 [U-Boot] [PATCH] imx-common: rdc-sema: correct return value Peng Fan
2017-05-11 10:37 ` Stefano Babic

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.