Re: [PATCH] phy: cadence-torrent: Check return value on register read
From: Vinod Koul
Date: Tue Jul 02 2024 - 09:13:41 EST
On 02-07-24, 09:43, Markus Elfring wrote:
> > cdns_torrent_dp_set_power_state() does not consider that ret might be
> > overwritten. Add return value check of regmap_read_poll_timeout() after
> > register read in cdns_torrent_dp_set_power_state().
>
> I suggest to improve such a change description another bit.
>
> 1. A return value is stored in the mentioned local variable.
>
> 2. Unfortunately, it was not immediately checked.
>
> * https://cwe.mitre.org/data/definitions/252.html
>
> * https://wiki.sei.cmu.edu/confluence/display/c/EXP12-C.+Do+not+ignore+values+returned+by+functions
>
> 3. How do you think about to avoid a repeated reference to a function name?
<form letter>
Feel free to ignore all comments from Markus, regardless whether the
suggestion is reasonable or not. This person is banned from LKML and
several maintainers ignore Markus' feedback, because it is just a waste
of time.
</form letter>
--
~Vinod