From: Tom Rini <trini@konsulko.com>
Date: Sun, 4 Dec 2022 15:03:32 +0000 (-0500)
Subject: valgrind: Rework test for unsupported platforms
X-Git-Tag: v2025.01-rc5-pxa1908~1158^2~5^2~131
X-Git-Url: http://git.dujemihanovic.xyz/img/html/static/gitweb.css?a=commitdiff_plain;h=dc2c451a94e11e0b5ac006fd603b746632734d5c;p=u-boot.git

valgrind: Rework test for unsupported platforms

Change things so that on an unsupported platform we will #error rather
than undef the feature.

Signed-off-by: Tom Rini <trini@konsulko.com>
---

diff --git a/include/valgrind/valgrind.h b/include/valgrind/valgrind.h
index e59a7fde32..5d4fa5f43b 100644
--- a/include/valgrind/valgrind.h
+++ b/include/valgrind/valgrind.h
@@ -121,7 +121,9 @@
 #else
 /* If we're not compiling for our target platform, don't generate
    any inline asms.  */
-#  undef CONFIG_VALGRIND
+#  if IS_ENABLED(CONFIG_VALGRIND)
+#    error "Unsupported platform for valgrind"
+#  endif
 #endif