Re: [PATCH] atm: eni: fix uninitialized variable warning

From: David Miller
Date: Wed Jan 08 2020 - 16:11:18 EST


From: Arnd Bergmann <arnd@xxxxxxxx>
Date: Tue, 7 Jan 2020 21:43:59 +0100

> With -O3, gcc has found an actual unintialized variable stored
> into an mmio register in two instances:
>
> drivers/atm/eni.c: In function 'discard':
> drivers/atm/eni.c:465:13: error: 'dma[1]' is used uninitialized in this function [-Werror=uninitialized]
> writel(dma[i*2+1],eni_dev->rx_dma+dma_wr*8+4);
> ^
> drivers/atm/eni.c:465:13: error: 'dma[3]' is used uninitialized in this function [-Werror=uninitialized]
>
> Change the code to always write zeroes instead.
>
> Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>

Applied.