All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] cobalt/synch: uapi: silence pedantic warning (signed/unsigned)
@ 2020-12-04 15:07 Philippe Gerum
  2020-12-11  6:44 ` Jan Kiszka
  0 siblings, 1 reply; 2+ messages in thread
From: Philippe Gerum @ 2020-12-04 15:07 UTC (permalink / raw)
  To: xenomai

From: Philippe Gerum <rpm@xenomai.org>

Signed-off-by: Philippe Gerum <rpm@xenomai.org>
---
 include/cobalt/uapi/kernel/synch.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/cobalt/uapi/kernel/synch.h b/include/cobalt/uapi/kernel/synch.h
index 33d7ab3c7..a21eb965e 100644
--- a/include/cobalt/uapi/kernel/synch.h
+++ b/include/cobalt/uapi/kernel/synch.h
@@ -71,7 +71,7 @@ int xnsynch_fast_acquire(atomic_t *fastlock, xnhandle_t new_ownerh)
 static inline
 int xnsynch_fast_release(atomic_t *fastlock, xnhandle_t cur_ownerh)
 {
-	return atomic_cmpxchg(fastlock, cur_ownerh, XN_NO_HANDLE)
+	return (xnhandle_t)atomic_cmpxchg(fastlock, cur_ownerh, XN_NO_HANDLE)
 		== cur_ownerh;
 }
 
-- 
2.26.2



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

* Re: [PATCH] cobalt/synch: uapi: silence pedantic warning (signed/unsigned)
  2020-12-04 15:07 [PATCH] cobalt/synch: uapi: silence pedantic warning (signed/unsigned) Philippe Gerum
@ 2020-12-11  6:44 ` Jan Kiszka
  0 siblings, 0 replies; 2+ messages in thread
From: Jan Kiszka @ 2020-12-11  6:44 UTC (permalink / raw)
  To: Philippe Gerum, xenomai

On 04.12.20 16:07, Philippe Gerum wrote:
> From: Philippe Gerum <rpm@xenomai.org>
> 
> Signed-off-by: Philippe Gerum <rpm@xenomai.org>
> ---
>  include/cobalt/uapi/kernel/synch.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/cobalt/uapi/kernel/synch.h b/include/cobalt/uapi/kernel/synch.h
> index 33d7ab3c7..a21eb965e 100644
> --- a/include/cobalt/uapi/kernel/synch.h
> +++ b/include/cobalt/uapi/kernel/synch.h
> @@ -71,7 +71,7 @@ int xnsynch_fast_acquire(atomic_t *fastlock, xnhandle_t new_ownerh)
>  static inline
>  int xnsynch_fast_release(atomic_t *fastlock, xnhandle_t cur_ownerh)
>  {
> -	return atomic_cmpxchg(fastlock, cur_ownerh, XN_NO_HANDLE)
> +	return (xnhandle_t)atomic_cmpxchg(fastlock, cur_ownerh, XN_NO_HANDLE)
>  		== cur_ownerh;
>  }
>  
> 

Thanks, applied.

Jan

-- 
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux


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

end of thread, other threads:[~2020-12-11  6:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-04 15:07 [PATCH] cobalt/synch: uapi: silence pedantic warning (signed/unsigned) Philippe Gerum
2020-12-11  6:44 ` Jan Kiszka

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.