[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] xen/arm: io: handle_read: Use a local variable to store dabt
commit efeedfa0eeec687a5df96c575160c33caeb6b31f Author: Julien Grall <julien.grall@xxxxxxxxxx> AuthorDate: Fri Dec 11 15:28:20 2015 +0000 Commit: Ian Campbell <ian.campbell@xxxxxxxxxx> CommitDate: Tue Jan 5 11:49:39 2016 +0000 xen/arm: io: handle_read: Use a local variable to store dabt 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 files 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 -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |