]> xenbits.xensource.com Git - qemu-xen.git/commitdiff
hw/block/tc58128: Don't emit deprecation warning under qtest
authorPeter Maydell <peter.maydell@linaro.org>
Tue, 6 Feb 2024 15:41:51 +0000 (15:41 +0000)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Thu, 15 Feb 2024 14:53:12 +0000 (15:53 +0100)
Suppress the deprecation warning when we're running under qtest,
to avoid "make check" including warning messages in its output.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20240206154151.155620-1-peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
hw/block/tc58128.c

index 6944cf58fa41deab82e59f5470d4569b9a247424..0984e37417b5d6893ad45911e301bd1318b9fa78 100644 (file)
@@ -202,7 +202,9 @@ static sh7750_io_device tc58128 = {
 
 int tc58128_init(struct SH7750State *s, const char *zone1, const char *zone2)
 {
-    warn_report_once("The TC58128 flash device is deprecated");
+    if (!qtest_enabled()) {
+        warn_report_once("The TC58128 flash device is deprecated");
+    }
     init_dev(&tc58128_devs[0], zone1);
     init_dev(&tc58128_devs[1], zone2);
     return sh7750_register_io_device(s, &tc58128);