Thank you for your contribution! Sashiko AI review found 1 potential issue(s) 
to consider:
- [High] drm/msm/dp: missing closing brace in msm_dp_bridge_hpd_notify()
--

commit 42034f570d120654d6aa4e06b9c582eb06cb2f5f
Author: Dmitry Baryshkov <[email protected]>

drm/msm: dp: handle the IRQ_HPD events reported by USB-C

This commit updates msm_dp_bridge_hpd_notify() to handle out-of-band
DRM_CONNECTOR_DP_IRQ_HPD events in addition to ISR_IRQ_HPD_PULSE_COUNT
link status pulses.

> diff --git a/drivers/gpu/drm/msm/dp/dp_display.c 
> b/drivers/gpu/drm/msm/dp/dp_display.c
> index ce919a26fba28..6a8b3b8e1fe7f 100644
> --- a/drivers/gpu/drm/msm/dp/dp_display.c
> +++ b/drivers/gpu/drm/msm/dp/dp_display.c
> @@ -1566,11 +1566,13 @@ void msm_dp_bridge_hpd_notify(struct drm_bridge 
> *bridge,
>               if (hpd_link_status == ISR_HPD_REPLUG_COUNT) {
>                       msm_dp_hpd_unplug_handle(dp);
>                       msm_dp_hpd_plug_handle(dp);
> -             } else if (hpd_link_status == ISR_IRQ_HPD_PULSE_COUNT) {
> -                     msm_dp_irq_hpd_handle(dp);
>               } else {
>                       msm_dp_hpd_plug_handle(dp);
>               }
> +
> +             if (hpd_link_status == ISR_IRQ_HPD_PULSE_COUNT ||
> +                 event == DRM_CONNECTOR_DP_IRQ_HPD) {
> +                     msm_dp_irq_hpd_handle(dp);
>       } else {
>               msm_dp_hpd_unplug_handle(dp);
>       }

[Severity: High]
Is a closing brace missing for the new if statement in
msm_dp_bridge_hpd_notify() in drivers/gpu/drm/msm/dp/dp_display.c?

The check for ISR_IRQ_HPD_PULSE_COUNT or DRM_CONNECTOR_DP_IRQ_HPD opens a
block with a brace before calling msm_dp_irq_hpd_handle(dp), but does not
close it before the following else branch:

        if (status == connector_status_connected) {
                ...
                if (hpd_link_status == ISR_IRQ_HPD_PULSE_COUNT ||
                    event == DRM_CONNECTOR_DP_IRQ_HPD) {
                        msm_dp_irq_hpd_handle(dp);
        } else {
                msm_dp_hpd_unplug_handle(dp);
        }

Because the block is not closed, the else branch pairs with the inner
if statement instead of the outer status == connector_status_connected check,
and the function body of msm_dp_bridge_hpd_notify() remains unclosed at the
end of the file, causing a build failure.

-- 
Sashiko AI review ยท 
https://sashiko.dev/#/patchset/[email protected]?part=7

Reply via email to