All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sebastian Reichel <sebastian.reichel@collabora.com>
To: Alexey Charkov <alchark@gmail.com>
Cc: Heikki Krogerus <heikki.krogerus@linux.intel.com>,
	 Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Dmitry Baryshkov <lumag@kernel.org>,
	linux-usb@vger.kernel.org,  linux-kernel@vger.kernel.org,
	kernel@collabora.com
Subject: Re: [PATCH] usb: typec: fusb302: add DRM DP HPD bridge support
Date: Fri, 13 Mar 2026 16:23:35 +0100	[thread overview]
Message-ID: <abQosjYhlkAEcTBI@venus> (raw)
In-Reply-To: <CABjd4YxCQw94qg30mC7a9CJWvYje_NrUkzw+gu5wzWx55SidEA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1125 bytes --]

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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2026-03-13 15:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-10 17:17 [PATCH] usb: typec: fusb302: add DRM DP HPD bridge support Sebastian Reichel
2026-03-11 13:43 ` Heikki Krogerus
2026-03-13  8:15 ` Alexey Charkov
2026-03-13 15:23   ` Sebastian Reichel [this message]
2026-03-13 18:09     ` Dmitry Baryshkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=abQosjYhlkAEcTBI@venus \
    --to=sebastian.reichel@collabora.com \
    --cc=alchark@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=kernel@collabora.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=lumag@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.