Browse Source

[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>
GUI 11 months ago
parent
commit
8c6c9205b0
1 changed files with 2 additions and 2 deletions
  1. 2 2
      components/drivers/ofw/irq.c

+ 2 - 2
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;
             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;
         err = -RT_EINVAL;