diff options
| author | Christian Bruel <[email protected]> | 2025-02-10 10:35:15 +0000 |
|---|---|---|
| committer | Vinod Koul <[email protected]> | 2025-02-10 16:56:07 +0000 |
| commit | fd75f371f3a1b04a33d2e750363d6ad76abf734e (patch) | |
| tree | 89b284de5f0e9f5a8c4114f038d91e4fad4129be /tools/testing/selftests/net/lib/py/utils.py | |
| parent | phy: rockchip: naneng-combphy: compatible reset with old DT (diff) | |
| download | kernel-fd75f371f3a1b04a33d2e750363d6ad76abf734e.tar.gz kernel-fd75f371f3a1b04a33d2e750363d6ad76abf734e.zip | |
phy: stm32: Fix constant-value overflow assertion
Rework the workaround as the lookup tables always fits into the bitfield,
and the default values are defined by the hardware and cannot be 0:
Guard against false positive with a WARN_ON check to make the compiler
happy: The offset range is pre-checked against the sorted imp_lookup_table
values and overflow should not happen and would be caught by a warning and
return in error.
Also guard against a true positive found during the max_vswing lookup, as a
max vswing value can be 802000 or 803000 microvolt depending on the current
impedance. Therefore set the default impedence index.
Fixes: 2de679ecd724 ("phy: stm32: work around constant-value overflow assertion")
Signed-off-by: Christian Bruel <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Vinod Koul <[email protected]>
Diffstat (limited to 'tools/testing/selftests/net/lib/py/utils.py')
0 files changed, 0 insertions, 0 deletions
