Madhavan Srinivasan <ma...@linux.vnet.ibm.com> writes:

> diff --git a/arch/powerpc/platforms/powernv/opal-imc.c 
> b/arch/powerpc/platforms/powernv/opal-imc.c
> index b150f4deaccf..4764e6932cb7 100644
> --- a/arch/powerpc/platforms/powernv/opal-imc.c
> +++ b/arch/powerpc/platforms/powernv/opal-imc.c
> @@ -153,6 +153,22 @@ static void disable_core_pmu_counters(void)
>       put_online_cpus();
>  }
>  
> +int get_max_nest_dev(void)
> +{
> +     struct device_node *node;
> +     u32 pmu_units, type;
> +
> +     for_each_compatible_node(node, NULL, IMC_DTB_UNIT_COMPAT) {
> +             if (of_property_read_u32(node, "type", &type))
> +                     continue;
> +
> +             if (type == IMC_TYPE_CHIP)
> +                     pmu_units++;
> +     }
> +
> +     return pmu_units;
> +}

Breaks:

  arch/powerpc/platforms/powernv/opal-imc.c:169:2: error: 'pmu_units' may be 
used uninitialized in this function [-Werror=maybe-uninitialized]

http://kisskb.ellerman.id.au/kisskb/head/1e59fb813346ee43be2a3a9acf4aac2815af1284/

cheers

Reply via email to