# Re: \[PATCH v5 1/4\] powerpc/mm: refactor radix physical page mapping

- From: Michael Ellerman \<mpe@ellerman.id.au\>
- Date: 2017-01-30 21:58:37 
- List: linuxppc-dev
- Page: https://ratatoskr.run/linuxppc-dev/2017/01/9494913
- Thread: https://ratatoskr.run/linuxppc-dev/2017/01/9494684/t.md

```text
Reza Arbab [ref] writes:

> On Mon, Jan 30, 2017 at 07:38:18PM +1100, Michael Ellerman wrote:
>>Doesn't build.
>>
>>In file included from ../include/linux/kernel.h:13:0,
>>                 from ../include/linux/sched.h:17,
>>                 from ../arch/powerpc/mm/pgtable-radix.c:11:
>>../arch/powerpc/mm/pgtable-radix.c: In function =E2=80=98create_physical_=
mapping=E2=80=99:
>>../include/linux/printk.h:299:2: error: =E2=80=98mapping_size=E2=80=99 ma=
y be used uninitialized in this function [-Werror=3Dmaybe-uninitialized]
>>  printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
>>  ^~~~~~
>>../arch/powerpc/mm/pgtable-radix.c:123:22: note: =E2=80=98mapping_size=E2=
=80=99 was declared here
>>  unsigned long addr, mapping_size;
>
> Doh. Could you please do the following for now?
>
> -	unsigned long addr, mapping_size;
> +	unsigned long addr, mapping_size =3D 0;

Thanks.

> I'd like to delay spinning v6 with this until I see any input you might=20
> have on the rest of the set.

I don't think I have any at the moment. So I'll just fold the above into
v5.

> And for future reference, how are you ending up with=20
> -Werror=3Dmaybe-uninitialized? On powerpc/next, with pseries_le_defconfig=
,=20
> I get -Wno-maybe-uninitialized.

By default. Probably you're not getting it because your compiler is too
old. If I'm reading Makefile correctly it's enabled for GCC 4.9 or later:

  KBUILD_CFLAGS +=3D $(call cc-ifversion, -lt, 0409, \
  			$(call cc-disable-warning,maybe-uninitialized,))

I'm using GCC 6.2.0.

cheers
```
