Re: [PATCH] drivers: net: xgene: Simplify xgene_enet_setup_mss() to kill warning

From: David Miller
Date: Fri Feb 24 2017 - 14:30:28 EST


From: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
Date: Fri, 24 Feb 2017 11:30:03 +0100

> With gcc-4.1.2 and -Os:
>
> drivers/net/ethernet/apm/xgene/xgene_enet_main.c: In function ʽxgene_enet_start_xmitʼ:
> drivers/net/ethernet/apm/xgene/xgene_enet_main.c:297: warning: ʽmss_indexʼ may be used uninitialized in this function
>
> Using a separate variable to track success may confuse the compiler.
> Preinitialize mss_index with -EBUSY and check for negative error values
> instead to kill the warning.
>
> Signed-off-by: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>

Applied, thank you.