summaryrefslogtreecommitdiffstats
path: root/src/commonlib/storage
diff options
context:
space:
mode:
authorFelix Held <felix-coreboot@felixheld.de>2019-06-20 14:26:09 +0200
committerFelix Held <felix-coreboot@felixheld.de>2019-06-21 12:49:43 +0000
commit8d2ec86c5ed5f33fc121346db06dff69ea75e18e (patch)
treed8c2806ef330a32b310b9bc6b01356a8564b3cb7 /src/commonlib/storage
parente1d57f7610921471d5fef0c78f7f9bb054a6ada1 (diff)
downloadcoreboot-8d2ec86c5ed5f33fc121346db06dff69ea75e18e.tar.gz
coreboot-8d2ec86c5ed5f33fc121346db06dff69ea75e18e.tar.bz2
coreboot-8d2ec86c5ed5f33fc121346db06dff69ea75e18e.zip
commonlib/storage: use ALIGN_UP instead of ALIGN for better readability
Change-Id: I76ec5ff107bc043d9457b3377e88226a96eb3f3c Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/33632 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr>
Diffstat (limited to 'src/commonlib/storage')
-rw-r--r--src/commonlib/storage/bouncebuf.h2
-rw-r--r--src/commonlib/storage/storage.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/commonlib/storage/bouncebuf.h b/src/commonlib/storage/bouncebuf.h
index 27d92e826bac..0d81be1faa57 100644
--- a/src/commonlib/storage/bouncebuf.h
+++ b/src/commonlib/storage/bouncebuf.h
@@ -88,7 +88,7 @@ int bounce_buffer_stop(struct bounce_buffer *state);
#define ALLOC_CACHE_ALIGN_BUFFER(type, name, size) \
char __##name[ROUND(size * sizeof(type), DMA_MINALIGN) + \
DMA_MINALIGN - 1]; \
- type *name = (type *) ALIGN((uintptr_t)__##name, DMA_MINALIGN)
+ type *name = (type *) ALIGN_UP((uintptr_t)__##name, DMA_MINALIGN)
#ifndef ARCH_DMA_MINALIGN
#define ARCH_DMA_MINALIGN (DMA_MINALIGN)
#endif
diff --git a/src/commonlib/storage/storage.h b/src/commonlib/storage/storage.h
index 645b6c1abdf5..c71510dd19c7 100644
--- a/src/commonlib/storage/storage.h
+++ b/src/commonlib/storage/storage.h
@@ -23,7 +23,7 @@
#define ALLOC_CACHE_ALIGN_BUFFER(type, name, size) \
char __##name[ROUND(size * sizeof(type), DMA_MINALIGN) + \
DMA_MINALIGN - 1]; \
- type *name = (type *) ALIGN((uintptr_t)__##name, DMA_MINALIGN)
+ type *name = (type *) ALIGN_UP((uintptr_t)__##name, DMA_MINALIGN)
/* NOOPs mirroring ARM's cache API, since x86 devices usually cache snoop */
#define dcache_invalidate_by_mva(addr, len)