[PATCH 3/3] lib: fix irqchip_plic_update_hartid_table

Xiang W wxjstz at 126.com
Wed Dec 7 09:02:02 PST 2022


在 2022-12-07星期三的 15:07 +0100,Heinrich Schuchardt写道:
> After determining cpu_offset we have to check this value.
> 
> Addresses-Coverity-ID: 1529706 ("Logically dead code")
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
LGTM

Reviewed-by: Xiang W <wxjstz at 126.com>
> ---
>  lib/utils/irqchip/fdt_irqchip_plic.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/utils/irqchip/fdt_irqchip_plic.c b/lib/utils/irqchip/fdt_irqchip_plic.c
> index a6e185c..fe08836 100644
> --- a/lib/utils/irqchip/fdt_irqchip_plic.c
> +++ b/lib/utils/irqchip/fdt_irqchip_plic.c
> @@ -86,7 +86,7 @@ static int irqchip_plic_update_hartid_table(void *fdt, int nodeoff,
>                         continue;
>  
>                 cpu_offset = fdt_parent_offset(fdt, cpu_intc_offset);
> -               if (cpu_intc_offset < 0)
> +               if (cpu_offset < 0)
>                         continue;
>  
>                 err = fdt_parse_hart_id(fdt, cpu_offset, &hartid);
> -- 
> 2.37.2
> 
> 





More information about the opensbi mailing list