On 03/31/15 09:06, Jordan Justen wrote: > Cc: Ard Biesheuvel <[email protected]> > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Jordan Justen <[email protected]> > --- > OvmfPkg/XenBusDxe/TestAndClearBit.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/OvmfPkg/XenBusDxe/TestAndClearBit.c > b/OvmfPkg/XenBusDxe/TestAndClearBit.c > index 410677e..ac01b3c 100644 > --- a/OvmfPkg/XenBusDxe/TestAndClearBit.c > +++ b/OvmfPkg/XenBusDxe/TestAndClearBit.c > @@ -2,6 +2,7 @@ > Implementation of TestAndClearBit using compare-exchange primitive > > Copyright (C) 2015, Linaro Ltd. > + Copyright (c) 2015, Intel Corporation. All rights reserved.<BR> > > This program and the accompanying materials > are licensed and made available under the terms and conditions of the BSD > License > @@ -32,7 +33,7 @@ TestAndClearBit ( > // ensure we round towards -Inf, and end up with a positive shift in > // 'Bit', even if 'Bit' itself is negative. > // > - Address += (Bit >> 4) * sizeof(UINT16); > + Address = (VOID*)((UINT8*) Address + ((Bit >> 4) * sizeof(UINT16)));
I'd prefer if the space wasn't there before "Address". (I know the coding style requires it officiall, but it is wrong -- it actively confuses the reader wrt. operator binding.) Anyway, Reviewed-by: Laszlo Ersek <[email protected]> > Mask = 1U << (Bit & 15); > > for (Word = *(UINT16 *) Address; Word & Mask; Word = Read) { > ------------------------------------------------------------------------------ Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ edk2-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/edk2-devel
