From: Julien Grall <julien.grall@arm.com>
To: Corneliu ZUZU <czuzu@bitdefender.com>, xen-devel@lists.xen.org
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
Stefano Stabellini <sstabellini@kernel.org>,
Jan Beulich <jbeulich@suse.com>
Subject: Re: [PATCH v4 5/7] xen/atomic.h: fix: make atomic_read() param const
Date: Fri, 15 Jul 2016 10:31:06 +0100 [thread overview]
Message-ID: <5788AD5A.1010909@arm.com> (raw)
In-Reply-To: <1468565447-32761-1-git-send-email-czuzu@bitdefender.com>
On 15/07/16 07:50, Corneliu ZUZU wrote:
> This wouldn't let me make a param of a function that used atomic_read() const.
>
> Signed-off-by: Corneliu ZUZU <czuzu@bitdefender.com>
> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Reviewed-by: Julien Grall <julien.grall@arm.com>
Regards,
> ---
> Changed since v3: <nothing>
> ---
> xen/include/asm-arm/atomic.h | 2 +-
> xen/include/asm-x86/atomic.h | 2 +-
> xen/include/xen/atomic.h | 2 +-
> 3 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/xen/include/asm-arm/atomic.h b/xen/include/asm-arm/atomic.h
> index a79420a..78dad29 100644
> --- a/xen/include/asm-arm/atomic.h
> +++ b/xen/include/asm-arm/atomic.h
> @@ -102,7 +102,7 @@ void __bad_atomic_size(void);
> * strex/ldrex monitor on some implementations. The reason we can use it for
> * atomic_set() is the clrex or dummy strex done on every exception return.
> */
> -static inline int atomic_read(atomic_t *v)
> +static inline int atomic_read(const atomic_t *v)
> {
> return *(volatile int *)&v->counter;
> }
> diff --git a/xen/include/asm-x86/atomic.h b/xen/include/asm-x86/atomic.h
> index 3e99b03..1729e29 100644
> --- a/xen/include/asm-x86/atomic.h
> +++ b/xen/include/asm-x86/atomic.h
> @@ -80,7 +80,7 @@ void __bad_atomic_size(void);
> } \
> })
>
> -static inline int atomic_read(atomic_t *v)
> +static inline int atomic_read(const atomic_t *v)
> {
> return read_atomic(&v->counter);
> }
> diff --git a/xen/include/xen/atomic.h b/xen/include/xen/atomic.h
> index d072912..6827468 100644
> --- a/xen/include/xen/atomic.h
> +++ b/xen/include/xen/atomic.h
> @@ -32,7 +32,7 @@ typedef struct { int counter; } atomic_t;
> *
> * Atomically reads the value of @v.
> */
> -static inline int atomic_read(atomic_t *v);
> +static inline int atomic_read(const atomic_t *v);
>
> /**
> * _atomic_read - read atomic variable non-atomically
>
--
Julien Grall
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-07-15 9:31 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-15 6:47 [PATCH v4 0/7] <asm/atomic.h> adjustments Corneliu ZUZU
2016-07-15 6:48 ` [PATCH v4 1/7] asm-arm/atomic.h: fix arm32|arm64 macros duplication Corneliu ZUZU
2016-07-15 9:28 ` Julien Grall
2016-07-15 9:55 ` Corneliu ZUZU
2016-07-15 10:06 ` Julien Grall
2016-07-15 10:17 ` Corneliu ZUZU
2016-07-15 6:48 ` [PATCH v4 2/7] asm-x86/atomic.h: minor: proper atomic_inc_and_test() placement Corneliu ZUZU
2016-07-15 6:49 ` [PATCH v4 3/7] asm-arm/atomic.h: reorder macros to match x86-side Corneliu ZUZU
2016-07-15 9:28 ` Julien Grall
2016-07-15 6:50 ` [PATCH v4 4/7] asm/atomic.h: common prototyping (add xen/atomic.h) Corneliu ZUZU
2016-07-15 9:30 ` Julien Grall
2016-07-15 9:59 ` Corneliu ZUZU
2016-07-15 6:50 ` [PATCH v4 5/7] xen/atomic.h: fix: make atomic_read() param const Corneliu ZUZU
2016-07-15 9:31 ` Julien Grall [this message]
2016-07-15 6:51 ` [PATCH v4 6/7] asm-arm/atomic.h: atomic_{inc, dec}_return: macros to inline functions Corneliu ZUZU
2016-07-15 6:59 ` Corneliu ZUZU
2016-07-15 6:52 ` [PATCH v4 7/7] asm/atomic.h: implement missing and add common prototypes Corneliu ZUZU
2016-07-15 9:34 ` Julien Grall
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5788AD5A.1010909@arm.com \
--to=julien.grall@arm.com \
--cc=andrew.cooper3@citrix.com \
--cc=czuzu@bitdefender.com \
--cc=jbeulich@suse.com \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.