[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251205074537.17072-2-jgross@suse.com>
Date: Fri, 5 Dec 2025 08:45:28 +0100
From: Juergen Gross <jgross@...e.com>
To: linux-kernel@...r.kernel.org,
kvm@...r.kernel.org
Cc: Juergen Gross <jgross@...e.com>,
Paolo Bonzini <pbonzini@...hat.com>
Subject: [PATCH 01/10] KVM: Switch coalesced_mmio_in_range() to return bool
Instead of 0 and 1 let coalesced_mmio_in_range() return false or
true.
Signed-off-by: Juergen Gross <jgross@...e.com>
---
virt/kvm/coalesced_mmio.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/virt/kvm/coalesced_mmio.c b/virt/kvm/coalesced_mmio.c
index 375d6285475e..bc022bd45863 100644
--- a/virt/kvm/coalesced_mmio.c
+++ b/virt/kvm/coalesced_mmio.c
@@ -22,22 +22,22 @@ static inline struct kvm_coalesced_mmio_dev *to_mmio(struct kvm_io_device *dev)
return container_of(dev, struct kvm_coalesced_mmio_dev, dev);
}
-static int coalesced_mmio_in_range(struct kvm_coalesced_mmio_dev *dev,
- gpa_t addr, int len)
+static bool coalesced_mmio_in_range(struct kvm_coalesced_mmio_dev *dev,
+ gpa_t addr, int len)
{
/* is it in a batchable area ?
* (addr,len) is fully included in
* (zone->addr, zone->size)
*/
if (len < 0)
- return 0;
+ return false;
if (addr + len < addr)
- return 0;
+ return false;
if (addr < dev->zone.addr)
- return 0;
+ return false;
if (addr + len > dev->zone.addr + dev->zone.size)
- return 0;
- return 1;
+ return false;
+ return true;
}
static int coalesced_mmio_write(struct kvm_vcpu *vcpu,
--
2.51.0
Powered by blists - more mailing lists