[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 1/4] xen/arm: io: handle_read: Use a local variable to store dabt



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@xxxxxxxxxx>

Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>

> ---
> Â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@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.