[PATCH master 2/7] include: zero_page: hide possibly NULL pointer variable from optimizer

Ahmad Fatoum a.fatoum at pengutronix.de
Sun May 21 22:22:17 PDT 2023


---
 include/zero_page.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/zero_page.h b/include/zero_page.h
index 26a12246f155..a71c0e0b8733 100644
--- a/include/zero_page.h
+++ b/include/zero_page.h
@@ -44,6 +44,8 @@ static inline void *zero_page_memcpy(void *dest, const void *src, size_t count)
 {
 	void *ret;
 
+	OPTIMIZER_HIDE_VAR(dest);
+
 	zero_page_access();
 	ret = memcpy(dest, src, count);
 	zero_page_faulting();
-- 
2.39.2




More information about the barebox mailing list