From 8c6c9205b01b14e99d41ddbc608fb4eef5d0362f Mon Sep 17 00:00:00 2001 From: GUI <39894654+GuEe-GUI@users.noreply.github.com> Date: Tue, 28 May 2024 09:52:10 +0800 Subject: [PATCH] [OFW] Fixup irq parse map and map mask (#8992) `map_len` and `map_mask_len` is the count of elements, not the bytes size of elements. Signed-off-by: GuEe-GUI <2991707448@qq.com> --- components/drivers/ofw/irq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/drivers/ofw/irq.c b/components/drivers/ofw/irq.c index d5b2fb5a30..f15c511dc0 100755 --- a/components/drivers/ofw/irq.c +++ b/components/drivers/ofw/irq.c @@ -196,8 +196,8 @@ static rt_err_t ofw_parse_irq_map(struct rt_ofw_node *np, struct rt_ofw_cell_arg break; } - map_len = sizeof(fdt32_t); - map_mask_len = sizeof(fdt32_t); + map_len /= sizeof(fdt32_t); + map_mask_len /= sizeof(fdt32_t); err = -RT_EINVAL;