Re: [PATCH v1 2/4] usb: phy: tegra: return error value from utmi_wait_register
From: Sergey Shtylyov
Date: Mon Feb 02 2026 - 14:28:39 EST
On 2/2/26 9:01 PM, Sergey Shtylyov wrote:
[...]
>>>> Return exact error value from utmi_wait_register during HSIC power on.
>>>>
>>>> Signed-off-by: Svyatoslav Ryhel <clamor95@xxxxxxxxx>
>>>> ---
>>>> drivers/usb/phy/phy-tegra-usb.c | 9 ++++++---
>>>> 1 file changed, 6 insertions(+), 3 deletions(-)
>>>>
>>>> diff --git a/drivers/usb/phy/phy-tegra-usb.c b/drivers/usb/phy/phy-tegra-usb.c
>>>> index 3a7a74f01d1c..6173b240c3ea 100644
>>>> --- a/drivers/usb/phy/phy-tegra-usb.c
>>>> +++ b/drivers/usb/phy/phy-tegra-usb.c
>>>> @@ -891,6 +891,7 @@ static int uhsic_phy_power_on(struct tegra_usb_phy *phy)
>>>> struct tegra_utmip_config *config = phy->config;
>>>> void __iomem *base = phy->regs;
>>>> u32 val;
>>>> + int err = 0;
>>>
>>> This initialization seems pointless -- the newly added variable gets overwritten
>>> by you later...
>>>
[...]
> I'm pretty sure gcc will drop this initialization when generating the object
> code and (what's worse)
Well, that's actually the good news. I've tried to feed an analogous code to
gcc and clang -- and both seemed to drop the initialization. I was not able to
make them complain using C=1 and C=2 with make...
> the static analyzers will trip on this code telling you
> that the value 0 is unused...
Svace (that we have to use here) surely bitches about that. :-)
[...]
MBR, Sergey