lkml.org 
[lkml]   [2018]   [Jul]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] irqchip/gic: check return value of of_address_to_resource
On Thu, 5 Jul 2018 12:32:22 -0700
Bo Yan <byan@nvidia.com> wrote:

> Marc,
>
> Sorry for the previous reply. My email settings were not correct, so it inserted those confidentiality text, which was not what I intended.
>
> This is what I think:
>
> diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c
> index ced10c4..0b60bb0 100644
> --- a/drivers/irqchip/irq-gic.c
> +++ b/drivers/irqchip/irq-gic.c
> @@ -1284,7 +1284,7 @@ static bool gic_check_eoimode(struct device_node *node, void __iomem **base)
> {
> struct resource cpuif_res;
>
> - of_address_to_resource(node, 1, &cpuif_res);
> + (void)of_address_to_resource(node, 1, &cpuif_res);
>
> if (!is_hyp_mode_available())
> return false;
>
> We are 100% sure of_address_to_resource will succeed in this particular case, so "(void)" will help suppress Coverity warning.

In all honesty. I don't see the point of patching the kernel to silence
a warning when we know that this is a false positive. I'm sure you can
flag that one as "false positive" in Coverity.

Thanks,

M.
--
Without deviation from the norm, progress is not possible.

\
 
 \ /
  Last update: 2018-07-07 12:02    [W:0.055 / U:0.312 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site