From 30d8e724e7b045a81815f07b5a568d4aa37461a9 Mon Sep 17 00:00:00 2001 From: Yu-Ping Wu Date: Tue, 23 Aug 2022 16:40:03 +0800 Subject: libpayload: Add const for dma_coherent argument Add the const modifier for the ptr argument of dma_coherent to avoid unnecessary type casting in payloads. BUG=none TEST=emerge-corsola libpayload BRANCH=none Change-Id: Ic4bb1d8318c7e83fd3ab3054aa0333cb27afe588 Signed-off-by: Yu-Ping Wu Reviewed-on: https://review.coreboot.org/c/coreboot/+/66961 Tested-by: build bot (Jenkins) Reviewed-by: Hung-Te Lin Reviewed-by: Hsin-Te Yuan --- payloads/libpayload/include/stdlib.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'payloads/libpayload/include') diff --git a/payloads/libpayload/include/stdlib.h b/payloads/libpayload/include/stdlib.h index 18f1dca8a4..ac386c1fa2 100644 --- a/payloads/libpayload/include/stdlib.h +++ b/payloads/libpayload/include/stdlib.h @@ -136,7 +136,7 @@ void print_malloc_map(void); void init_dma_memory(void *start, u32 size); int dma_initialized(void); -int dma_coherent(void *ptr); +int dma_coherent(const void *ptr); static inline void *xmalloc_work(size_t size, const char *file, const char *func, int line) -- cgit v1.2.3