From: Sergey Shtylyov <sergei.shtylyov@gmail.com>
To: Svyatoslav Ryhel <clamor95@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Mikko Perttunen <mperttunen@nvidia.com>,
Thierry Reding <thierry.reding@gmail.com>,
Jonathan Hunter <jonathanh@nvidia.com>,
linux-usb@vger.kernel.org, linux-tegra@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 2/4] usb: phy: tegra: return error value from utmi_wait_register
Date: Mon, 2 Feb 2026 22:28:29 +0300 [thread overview]
Message-ID: <d63a6d27-14a1-4064-b5b2-e144beeb0827@gmail.com> (raw)
In-Reply-To: <aabfe8bb-cd04-43f4-b0e5-07aca86c3ae0@gmail.com>
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@gmail.com>
>>>> ---
>>>> 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
next prev parent reply other threads:[~2026-02-02 19:28 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-02 8:05 [PATCH v1 0/4] usb: phy: tegra: HSIC adjustments Svyatoslav Ryhel
2026-02-02 8:05 ` [PATCH v1 1/4] usb: phy: tegra: cosmetic fixes Svyatoslav Ryhel
2026-02-02 8:05 ` [PATCH v1 2/4] usb: phy: tegra: return error value from utmi_wait_register Svyatoslav Ryhel
2026-02-02 12:05 ` Sergey Shtylyov
2026-02-02 12:14 ` Svyatoslav Ryhel
2026-02-02 18:01 ` Sergey Shtylyov
2026-02-02 19:28 ` Sergey Shtylyov [this message]
2026-02-02 8:05 ` [PATCH v1 3/4] usb: phy: tegra: parametrize HSIC PTS value Svyatoslav Ryhel
2026-02-02 8:05 ` [PATCH v1 4/4] usb: phy: tegra: parametrize PORTSC1 register offset Svyatoslav Ryhel
2026-02-02 8:10 ` [PATCH v1 0/4] usb: phy: tegra: HSIC adjustments Mikko Perttunen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d63a6d27-14a1-4064-b5b2-e144beeb0827@gmail.com \
--to=sergei.shtylyov@gmail.com \
--cc=clamor95@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=jonathanh@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mperttunen@nvidia.com \
--cc=thierry.reding@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox