From: Ian Campbell <ian.campbell@citrix.com>
To: Julien Grall <julien.grall@citrix.com>, xen-devel@lists.xenproject.org
Cc: stefano.stabellini@eu.citrix.com
Subject: Re: [PATCH 1/4] xen/arm: io: handle_read: Use a local variable to store dabt
Date: Tue, 15 Dec 2015 10:27:01 +0000 [thread overview]
Message-ID: <1450175221.16856.115.camel@citrix.com> (raw)
In-Reply-To: <1449847703-21252-2-git-send-email-julien.grall@citrix.com>
On Fri, 2015-12-11 at 15:28 +0000, Julien Grall wrote:
> Rather than getting dabt every time through info->dabt, introduce a
> local variable and use it.
>
> Also fix a coding style error in the if condition.
>
> Signed-off-by: Julien Grall <julien.grall@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
> ---
> xen/arch/arm/io.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/xen/arch/arm/io.c b/xen/arch/arm/io.c
> index de5765a..7e29943 100644
> --- a/xen/arch/arm/io.c
> +++ b/xen/arch/arm/io.c
> @@ -26,7 +26,8 @@
> static int handle_read(const struct mmio_handler *handler, struct vcpu
> *v,
> mmio_info_t *info, register_t *r)
> {
> - uint8_t size = (1 << info->dabt.size) * 8;
> + const struct hsr_dabt dabt = info->dabt;
> + uint8_t size = (1 << dabt.size) * 8;
>
> if ( !handler->ops->read(v, info, r, handler->priv) )
> return 0;
> @@ -36,7 +37,7 @@ static int handle_read(const struct mmio_handler
> *handler, struct vcpu *v,
> * Note that we expect the read handler to have zeroed the bits
> * outside the requested access size.
> */
> - if ( info->dabt.sign && (*r & (1UL << (size - 1)) ))
> + if ( dabt.sign && (*r & (1UL << (size - 1))) )
> {
> /*
> * We are relying on register_t using the same as
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2015-12-15 10:30 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-11 15:28 [PATCH 0/4] xen/arm64: Emulate correctly the register {w, x}zr Julien Grall
2015-12-11 15:28 ` [PATCH 1/4] xen/arm: io: handle_read: Use a local variable to store dabt Julien Grall
2015-12-15 10:27 ` Ian Campbell [this message]
2015-12-11 15:28 ` [PATCH 2/4] xen/arm64: Document the register mapping aarch64 <-> aarch32 Julien Grall
2015-12-15 10:33 ` Ian Campbell
2015-12-11 15:28 ` [PATCH 3/4] xen/arm: vtimer: Introduce vtimer_emulate_sysreg{32, 64} Julien Grall
2015-12-15 10:38 ` Ian Campbell
2015-12-15 10:55 ` Julien Grall
2015-12-11 15:28 ` [PATCH 4/4] xen/arm64: Emulate correctly the register {w, x}zr Julien Grall
2015-12-15 11:10 ` Ian Campbell
2015-12-15 11:41 ` Julien Grall
2015-12-15 11:51 ` Ian Campbell
2015-12-17 17:17 ` [PATCH 0/4] " Julien Grall
2015-12-17 17:36 ` Ian Campbell
2016-01-05 14:54 ` Ian Campbell
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=1450175221.16856.115.camel@citrix.com \
--to=ian.campbell@citrix.com \
--cc=julien.grall@citrix.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=xen-devel@lists.xenproject.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.