From 93e33beb2c909bd95feeca77a21d45d60f63769c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Peixoto?= Date: Sat, 21 Sep 2024 09:30:06 +0100 Subject: [PATCH] ref(core/remio): reanmed io_device to dev MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: João Peixoto --- src/core/remio.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/core/remio.c b/src/core/remio.c index dd71c3e4..96b273b8 100644 --- a/src/core/remio.c +++ b/src/core/remio.c @@ -294,9 +294,9 @@ static size_t remio_get_request_event_count(struct remio_device* device) static struct remio_device* remio_find_dev_by_id(remio_id_t id) { struct remio_device* device = NULL; - list_foreach (remio_device_list, struct remio_device, io_device) { - if (id == io_device->id) { - device = io_device; + list_foreach (remio_device_list, struct remio_device, dev) { + if (id == dev->id) { + device = dev; break; } } @@ -460,8 +460,7 @@ void remio_init(void) device->config.frontend.vm_id = vm_id; device->config.frontend.interrupt = dev->interrupt; device->config.frontend.cpu_id = (cpuid_t)-1; - } - else { + } else { ERROR("Unknown Remote I/O device type"); } } @@ -477,11 +476,11 @@ void remio_init(void) void remio_assign_vm_cpus(struct vm* vm) { - list_foreach (remio_device_list, struct remio_device, io_device) { - if (vm->id == io_device->config.backend.vm_id) { - io_device->config.backend.cpu_id = min(io_device->config.backend.cpu_id, cpu()->id); - } else if (vm->id == io_device->config.frontend.vm_id) { - io_device->config.frontend.cpu_id = min(io_device->config.frontend.cpu_id, cpu()->id); + list_foreach (remio_device_list, struct remio_device, dev) { + if (vm->id == dev->config.backend.vm_id) { + dev->config.backend.cpu_id = min(dev->config.backend.cpu_id, cpu()->id); + } else if (vm->id == dev->config.frontend.vm_id) { + dev->config.frontend.cpu_id = min(dev->config.frontend.cpu_id, cpu()->id); } } }