All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] CRIS: locking: fix the return value of arch_read_trylock()
@ 2012-10-17 14:54 Wei Yongjun
  2012-10-19  8:35 ` Jesper Nilsson
  0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2012-10-17 14:54 UTC (permalink / raw)
  To: starvik, jesper.nilsson; +Cc: yongjun_wei, linux-cris-kernel, linux-kernel

From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

arch_write_trylock() should return 'ret' instead of always
return 1.

dpatch engine is used to auto generate this patch.
(https://github.com/weiyj/dpatch)

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
 arch/cris/include/arch-v32/arch/spinlock.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/cris/include/arch-v32/arch/spinlock.h b/arch/cris/include/arch-v32/arch/spinlock.h
index f171a66..f132755 100644
--- a/arch/cris/include/arch-v32/arch/spinlock.h
+++ b/arch/cris/include/arch-v32/arch/spinlock.h
@@ -118,7 +118,7 @@ static  inline int arch_write_trylock(arch_rwlock_t *rw)
 		ret = 1;
 	}
 	arch_spin_unlock(&rw->slock);
-	return 1;
+	return ret;
 }
 
 #define _raw_read_lock_flags(lock, flags) _raw_read_lock(lock)



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

* Re: [PATCH] CRIS: locking: fix the return value of arch_read_trylock()
  2012-10-17 14:54 [PATCH] CRIS: locking: fix the return value of arch_read_trylock() Wei Yongjun
@ 2012-10-19  8:35 ` Jesper Nilsson
  0 siblings, 0 replies; 2+ messages in thread
From: Jesper Nilsson @ 2012-10-19  8:35 UTC (permalink / raw)
  To: Wei Yongjun; +Cc: starvik, yongjun_wei, linux-cris-kernel, linux-kernel

On Wed, Oct 17, 2012 at 10:54:27PM +0800, Wei Yongjun wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> 
> arch_write_trylock() should return 'ret' instead of always
> return 1.
> 
> dpatch engine is used to auto generate this patch.
> (https://github.com/weiyj/dpatch)

I've taken this into the CRIS-tree, thanks!

> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> ---
>  arch/cris/include/arch-v32/arch/spinlock.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/cris/include/arch-v32/arch/spinlock.h b/arch/cris/include/arch-v32/arch/spinlock.h
> index f171a66..f132755 100644
> --- a/arch/cris/include/arch-v32/arch/spinlock.h
> +++ b/arch/cris/include/arch-v32/arch/spinlock.h
> @@ -118,7 +118,7 @@ static  inline int arch_write_trylock(arch_rwlock_t *rw)
>  		ret = 1;
>  	}
>  	arch_spin_unlock(&rw->slock);
> -	return 1;
> +	return ret;
>  }
>  
>  #define _raw_read_lock_flags(lock, flags) _raw_read_lock(lock)
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

/^JN - Jesper Nilsson
-- 
               Jesper Nilsson -- jesper.nilsson@axis.com

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

end of thread, other threads:[~2012-10-19  8:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-17 14:54 [PATCH] CRIS: locking: fix the return value of arch_read_trylock() Wei Yongjun
2012-10-19  8:35 ` Jesper Nilsson

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.