]> git.proxmox.com Git - mirror_edk2.git/commit
ArmPkg/ArmDmaLib: consistently use 'gCacheAlignment - 1' as alignment mask
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Tue, 19 Apr 2016 14:16:37 +0000 (16:16 +0200)
committerArd Biesheuvel <ard.biesheuvel@linaro.org>
Tue, 10 May 2016 12:44:27 +0000 (14:44 +0200)
commit80e5a33da1fcbe54cbcc178f1880e80e297d5fd4
tree5b4f9ede9312b0eaee3f57811147e6bcba5e125e
parente55f8c73b6255b353c021ab59017a364dd527a86
ArmPkg/ArmDmaLib: consistently use 'gCacheAlignment - 1' as alignment mask

We manage to use both an AND operation with 'gCacheAlignment - 1' and a
modulo operation with 'gCacheAlignment' in the same compound if statement.
Since gCacheAlignment is a global of which the compiler cannot guarantee
that it is a power of two, simply use the AND version in both cases.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
ArmPkg/Library/ArmDmaLib/ArmDmaLib.c