drm/bridge: analogix_dp: Drop dead error check for analogix_dp_init_analog_func()
Subsystems (3)
PATCH v2 1/1 drm/bridge: analogix_dp: Drop dead error check for analogix_dp_init_analog_func()
From: laixiangwu <[email protected]>
analogix_dp_init_analog_func() cannot fail: since commit 917c8d192ba6ad ("drm/bridge: analogix_dp: don't wait for PLL lock too early") removed the PLL lock polling loop, the function only performs register writes and always returns 0. The error check on its return value in analogix_dp_set_bridge() is therefore dead code.
Drop the dead check and make the function void.
---
Changes in v2:
- Rework the patch completely. The v1 fixed the runtime PM reference leak on the analogix_dp_init_analog_func() failure path, but as noted in the Sashiko AI review that path is unreachable: since 917c8d192ba6ad ("drm/bridge: analogix_dp: don't wait for PLL lock too early") removed the PLL lock polling loop, the function only performs register writes and always returns 0. Instead of keeping a fix for an unreachable path, drop the dead error check and make the function void.
drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 4 +--- drivers/gpu/drm/bridge/analogix/analogix_dp_core.h | 2 +- drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-)
drivers/gpu/drm/bridge/analogix/analogix_dp_core.c +1 -3
@@ -996,9 +996,7 @@ static int analogix_dp_set_bridge(struct analogix_dp_device *dp)pm_runtime_get_sync (dp->dev); - ret =analogix_dp_init_analog_func (dp); -if (ret) -return ret; +analogix_dp_init_analog_func (dp);/* * According to DP spec v1.3 chap 3.5.1.2 Link Training,
drivers/gpu/drm/bridge/analogix/analogix_dp_core.h +1 -1
@@ -192,7 +192,7 @@ void analogix_dp_set_pll_power_down(struct analogix_dp_device *dp, bool enable);void analogix_dp_set_analog_power_down (struct analogix_dp_device *dp,enum analog_power_block block,bool enable); -int analogix_dp_init_analog_func (struct analogix_dp_device *dp); +void analogix_dp_init_analog_func (struct analogix_dp_device *dp);void analogix_dp_init_hpd (struct analogix_dp_device *dp);void analogix_dp_force_hpd (struct analogix_dp_device *dp);enum dp_irq_type analogix_dp_get_irq_type (struct analogix_dp_device *dp);
drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c +1 -2
@@ -351,7 +351,7 @@ void analogix_dp_set_analog_power_down(struct analogix_dp_device *dp, } } -int analogix_dp_init_analog_func (struct analogix_dp_device *dp) +void analogix_dp_init_analog_func (struct analogix_dp_device *dp) {u32 reg;
@@ -372,7 +372,6 @@ int analogix_dp_init_analog_func(struct analogix_dp_device *dp) reg &= ~(SERDES_FIFO_FUNC_EN_N |LS_CLK_DOMAIN_FUNC_EN_N |AUX_FUNC_EN_N );writel (reg, dp->reg_base +ANALOGIX_DP_FUNC_EN_2 ); -return 0 ; }void analogix_dp_clear_hotplug_interrupts (struct analogix_dp_device *dp)
Signature · 1 line
2.50.1.windows.1
[email protected]
AI reviewThank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [High] drm/bridge: analogix_dp: Signed-off-by uses handle instead of real name --
Thank you for your contribution! Sashiko AI review found 1 potential issue to consider:
- [High] drm/bridge: analogix_dp: Signed-off-by uses handle instead of real name
--
commit b6a1a7f2eef3c9d11adbe1470d41eb8ca3821faa
Author: laixiangwu <[email protected]>
Quoted 11 lines
drm/bridge:
analogix_dp: Drop dead error check foranalogix_dp_init_analog_func()
analogix_dp_init_analog_func()cannot fail: since commit917c8d192ba6ad("drm/bridge:analogix_dp: don't wait for PLL lock too early") removed the PLL lock polling loop, the function only performs register writes and always returns 0. The error check on its return value inanalogix_dp_set_bridge()is therefore dead code.Drop the dead check and make the function void.
Signed-off-by laixiangwu <[email protected]>
[Severity: High]
The Author header and Signed-off-by trailer use a single-word account handle ("laixiangwu") rather than a real human name (for example, "Firstname Lastname"), which does not meet the Developer's Certificate of Origin requirements in Documentation/process/submitting-patches.rst.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
Hi,
thanks for the review. You are right, an account handle is not a proper name for the Developer's Certificate of Origin. v3 uses "Xiangwu Lai" for the author and the Signed-off-by trailer; it follows shortly.
Best regards,
Xiangwu Lai