mirror of https://github.com/xemu-project/xemu.git
exec: Remove dead code (CID 1432876)
We removed the global_locking field in commit4174495408
, leaving dead code around the 'unlocked' variable. Remove it to fix the DEADCODE issue reported by Coverity (CID 1432876). Fixes:4174495408
("exec: Remove MemoryRegion::global_locking field") Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20201030153752.1557776-1-philmd@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
2eba427eb1
commit
3792185112
|
@ -2723,22 +2723,14 @@ static int memory_access_size(MemoryRegion *mr, unsigned l, hwaddr addr)
|
||||||
|
|
||||||
static bool prepare_mmio_access(MemoryRegion *mr)
|
static bool prepare_mmio_access(MemoryRegion *mr)
|
||||||
{
|
{
|
||||||
bool unlocked = !qemu_mutex_iothread_locked();
|
|
||||||
bool release_lock = false;
|
bool release_lock = false;
|
||||||
|
|
||||||
if (unlocked) {
|
if (!qemu_mutex_iothread_locked()) {
|
||||||
qemu_mutex_lock_iothread();
|
qemu_mutex_lock_iothread();
|
||||||
unlocked = false;
|
|
||||||
release_lock = true;
|
release_lock = true;
|
||||||
}
|
}
|
||||||
if (mr->flush_coalesced_mmio) {
|
if (mr->flush_coalesced_mmio) {
|
||||||
if (unlocked) {
|
|
||||||
qemu_mutex_lock_iothread();
|
|
||||||
}
|
|
||||||
qemu_flush_coalesced_mmio_buffer();
|
qemu_flush_coalesced_mmio_buffer();
|
||||||
if (unlocked) {
|
|
||||||
qemu_mutex_unlock_iothread();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return release_lock;
|
return release_lock;
|
||||||
|
|
Loading…
Reference in New Issue