[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 61/63] accel/tcg/icount-common: Consolidate the use of warn_report
From: |
Paolo Bonzini |
Subject: |
[PULL 61/63] accel/tcg/icount-common: Consolidate the use of warn_report_once() |
Date: |
Tue, 23 Apr 2024 17:09:49 +0200 |
From: Zhao Liu <zhao1.liu@intel.com>
Use warn_report_once() to get rid of the static local variable "notified".
Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
Message-ID: <20240418100716.1085491-1-zhao1.liu@linux.intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
accel/tcg/icount-common.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/accel/tcg/icount-common.c b/accel/tcg/icount-common.c
index a4a747d1dc9..8d3d3a7e9dc 100644
--- a/accel/tcg/icount-common.c
+++ b/accel/tcg/icount-common.c
@@ -336,10 +336,8 @@ void icount_start_warp_timer(void)
deadline = qemu_clock_deadline_ns_all(QEMU_CLOCK_VIRTUAL,
~QEMU_TIMER_ATTR_EXTERNAL);
if (deadline < 0) {
- static bool notified;
- if (!icount_sleep && !notified) {
- warn_report("icount sleep disabled and no active timers");
- notified = true;
+ if (!icount_sleep) {
+ warn_report_once("icount sleep disabled and no active timers");
}
return;
}
--
2.44.0
- [PULL 31/63] hw/i386/acpi: Set PCAT_COMPAT bit only when pic is not disabled, (continued)
- [PULL 31/63] hw/i386/acpi: Set PCAT_COMPAT bit only when pic is not disabled, Paolo Bonzini, 2024/04/23
- [PULL 40/63] KVM: track whether guest state is encrypted, Paolo Bonzini, 2024/04/23
- [PULL 47/63] trace/kvm: Split address space and slot id in trace_kvm_set_user_memory(), Paolo Bonzini, 2024/04/23
- [PULL 18/63] stubs: move monitor_fdsets_cleanup with other fdset stubs, Paolo Bonzini, 2024/04/23
- [PULL 16/63] stubs: split record/replay stubs further, Paolo Bonzini, 2024/04/23
- [PULL 26/63] target/i386: Introduce Icelake-Server-v7 to enable TSX, Paolo Bonzini, 2024/04/23
- [PULL 28/63] target/i386: Export RFDS bit to guests, Paolo Bonzini, 2024/04/23
- [PULL 35/63] s390: Switch to use confidential_guest_kvm_init(), Paolo Bonzini, 2024/04/23
- [PULL 43/63] target/i386: Implement mc->kvm_type() to get VM type, Paolo Bonzini, 2024/04/23
- [PULL 61/63] accel/tcg/icount-common: Consolidate the use of warn_report_once(),
Paolo Bonzini <=
- [PULL 59/63] target/i386/cpu: Consolidate the use of warn_report_once(), Paolo Bonzini, 2024/04/23
- [PULL 06/63] util/qemu-config: Extract QMP commands to qemu-config-qmp.c, Paolo Bonzini, 2024/04/23
- [PULL 20/63] vga: move dirty memory region code together, Paolo Bonzini, 2024/04/23
- [PULL 23/63] target/i386: add guest-phys-bits cpu property, Paolo Bonzini, 2024/04/23
- [PULL 25/63] i386/kvm: Move architectural CPUID leaf generation to separate helper, Paolo Bonzini, 2024/04/23
- [PULL 30/63] q35: Introduce smm_ranges property for q35-pci-host, Paolo Bonzini, 2024/04/23
- [PULL 39/63] runstate: skip initial CPU reset if reset is not actually possible, Paolo Bonzini, 2024/04/23
- [PULL 48/63] kvm: Introduce support for memory_attributes, Paolo Bonzini, 2024/04/23
- [PULL 38/63] linux-headers: update to current kvm/next, Paolo Bonzini, 2024/04/23