summary refs log tree commit diff stats
path: root/include/qemu/log-for-trace.h
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2025-09-29 17:49:35 +0200
committerStefan Hajnoczi <stefanha@redhat.com>2025-10-01 11:22:07 -0400
commit75871d88d3ddf310dd5ffb1d36c8476959692726 (patch)
treeb5020ad2f3222d61b69a9316e6bf9cabeb814c1e /include/qemu/log-for-trace.h
parent42f73f264a9fc0b1d38d84e8e716e69e929d6697 (diff)
downloadfocaccia-qemu-75871d88d3ddf310dd5ffb1d36c8476959692726.tar.gz
focaccia-qemu-75871d88d3ddf310dd5ffb1d36c8476959692726.zip
log: change qemu_loglevel to unsigned
Bindgen makes the LOG_* constants unsigned, even if they are defined as
(1 << 15):

   pub const LOG_TRACE: u32 = 32768;

Make them unsigned in C as well through the BIT() macro, and also change
the type of the variable that they are used with.

Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-ID: <20250929154938.594389-14-pbonzini@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'include/qemu/log-for-trace.h')
-rw-r--r--include/qemu/log-for-trace.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/qemu/log-for-trace.h b/include/qemu/log-for-trace.h
index d47c9cd446..f3a8791f1d 100644
--- a/include/qemu/log-for-trace.h
+++ b/include/qemu/log-for-trace.h
@@ -19,9 +19,9 @@
 #define QEMU_LOG_FOR_TRACE_H
 
 /* Private global variable, don't use */
-extern int qemu_loglevel;
+extern unsigned qemu_loglevel;
 
-#define LOG_TRACE          (1 << 15)
+#define LOG_TRACE          (1u << 15)
 
 /* Returns true if a bit is set in the current loglevel mask */
 static inline bool qemu_loglevel_mask(int mask)