Re: [PATCH] usb: fixing some clang warnings inside usb host drivers

From: Joe Perches
Date: Sat Dec 18 2021 - 05:49:56 EST


On Sat, 2021-12-18 at 01:24 -0300, Julio Faracco wrote:
> Clang is reporting some issues related variable values not used and
> other issues inside some USB host drivers. This commit removes some
> trashes and adds some strategies to mitigate those warnings.
[]
> diff --git a/drivers/usb/host/ehci-dbg.c b/drivers/usb/host/ehci-dbg.c
[]
> @@ -903,7 +903,6 @@ static ssize_t fill_registers_buffer(struct debug_buffer *buf)
> temp = scnprintf(next, size, "complete %ld unlink %ld\n",
> ehci->stats.complete, ehci->stats.unlink);
> size -= temp;
> - next += temp;
> #endif

I think this should line not be removed as it's a code pattern
repeated multiple times above and another entry could be added
below.