Re: [PATCH net-next] net: ks8851: Make ks8851_read_selftest() return void

From: Andrew Lunn
Date: Thu Jun 03 2021 - 13:02:27 EST


On Thu, Jun 03, 2021 at 09:56:13AM -0700, Nathan Chancellor wrote:
> clang points out that ret in ks8851_read_selftest() is set but unused:
>
> drivers/net/ethernet/micrel/ks8851_common.c:1028:6: warning: variable
> 'ret' set but not used [-Wunused-but-set-variable]
> int ret = 0;
> ^
> 1 warning generated.
>
> The return code of this function has never been checked so just remove
> ret and make the function return void.
>
> Fixes: 3ba81f3ece3c ("net: Micrel KS8851 SPI network driver")
> Suggested-by: Andrew Lunn <andrew@xxxxxxx>
> Signed-off-by: Nathan Chancellor <nathan@xxxxxxxxxx>

Reviewed-by: Andrew Lunn <andrew@xxxxxxx>

Andrew