Re: [PATCH 25/32] usb: early: ehci-dbgp: Remove set but never checked variable 'ret'

From: Lee Jones
Date: Mon Jul 06 2020 - 13:57:50 EST


On Mon, 06 Jul 2020, Eric W. Biederman wrote:

> Lee Jones <lee.jones@xxxxxxxxxx> writes:
>
> > 'ret' hasn't been checked since the driver's inception in 2009.
>
> Minor quibble the inception was in 5c05917e7fe3 ("x86: usb debug port
> early console, v4") in July of 2008.

I'm only going back as far as the inception of ehci-dbgp.c.

> Acked-by: "Eric W. Biederman" <ebiederm@xxxxxxxxxxxx>

Great, thanks.

> > Fixes the following W=1 kernel build warning(s):
> >
> > drivers/usb/early/ehci-dbgp.c: In function âearly_dbgp_writeâ:
> > drivers/usb/early/ehci-dbgp.c:915:13: warning: variable âretâ set but not used [-Wunused-but-set-variable]
> > 915 | int chunk, ret;
> > | ^~~
> >
> > Cc: Sumit Garg <sumit.garg@xxxxxxxxxx>
> > Cc: Daniel Thompson <daniel.thompson@xxxxxxxxxx>
> > Cc: Douglas Anderson <dianders@xxxxxxxxxxxx>
> > Cc: Petr Mladek <pmladek@xxxxxxxx>
> > Cc: "Eric W. Biederman" <ebiederm@xxxxxxxxxxxx>
> > Cc: Yinghai Lu <yhlu.kernel@xxxxxxxxx>
> > Cc: Jason Wessel <jason.wessel@xxxxxxxxxxxxx>
> > Signed-off-by: Lee Jones <lee.jones@xxxxxxxxxx>
> > ---
> > drivers/usb/early/ehci-dbgp.c | 6 +++---
> > 1 file changed, 3 insertions(+), 3 deletions(-)

--
Lee Jones [æçæ]
Senior Technical Lead - Developer Services
Linaro.org â Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog