Re: [PATCH] usb: typec: fusb302: add DRM DP HPD bridge support

From: Sebastian Reichel

Date: Fri Mar 13 2026 - 11:28:13 EST


Hi,

On Fri, Mar 13, 2026 at 12:15:08PM +0400, Alexey Charkov wrote:
> [...]
> > + ret = devm_drm_dp_hpd_bridge_add(chip->dev, bridge_dev);
> > + if (ret)
> > + return ret;
> > +
> > return ret;
>
> Nit: how about
>
> return devm_drm_dp_hpd_bridge_add(chip->dev, bridge_dev);
>
> Saves three lines :)

The patch got queued already. I can provide a follow-up patch if
that is something people want to see. Generally this is a style
decision handled differently between subsystems. Your suggestion
saves three lines and is more efficient (but compiler will optimize
to that anyways). Meanwhile the version I provided results in
smaller diff when more code is appended in the probe function or
the order has to be changed for some reason.

FWIW I would like to see this driver be more converted towards
device managed resource and then use drm_dp_hpd_bridge_register()
instead of doing the allocation and add step separetely. But I
would wait with the cleanup until the 7.2 cycle as
devm_alloc_ordered_workqueue() will land in 7.1.

Greetings,

-- Sebastian

Attachment: signature.asc
Description: PGP signature