On Mon, Aug 22, 2022 at 02:45:18PM +0530, Viresh Kumar wrote:
This patch allocates Virtio MMIO params (IRQ and memory region) and pass them to the backend, also update Guest device-tree based on Virtio GPIO DT bindings [1].
[1] https://www.kernel.org/doc/Documentation/devicetree/bindings/gpio/gpio-virti...
Reviewed-by: Oleksandr Tyshchenko oleksandr_tyshchenko@epam.com Signed-off-by: Viresh Kumar viresh.kumar@linaro.org
tools/libs/light/libxl_arm.c | 51 ++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+)
diff --git a/tools/libs/light/libxl_arm.c b/tools/libs/light/libxl_arm.c index 4c1012e56893..86c1e560900f 100644 --- a/tools/libs/light/libxl_arm.c +++ b/tools/libs/light/libxl_arm.c @@ -121,6 +121,15 @@ int libxl__arch_domain_prepare_config(libxl__gc *gc, return rc; }
- for (i = 0; i < d_config->num_gpios; i++) {
libxl_device_gpio *gpio = &d_config->gpios[i];
- int rc = alloc_virtio_mmio_params(gc, &gpio->base, &gpio->irq,
Indentation seems wrong here.
Also, you could declare "rc" (without an initial value) for the whole function rather than declaring it in each for loop scope.
Then, this patch could be squash into the one that adds GPIO support to libxl.
Thanks,