mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Vishnu Saini <vishnu.saini@oss.qualcomm.com>
To: Markus Elfring <Markus.Elfring@web.de>
Cc: Prahlad Valluru <vvalluru@qti.qualcomm.com>,
	dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org,
	Andrzej Hajda <andrzej.hajda@intel.com>,
	Conor Dooley <conor+dt@kernel.org>,
	David Airlie <airlied@gmail.com>,
	Jernej Skrabec <jernej.skrabec@gmail.com>,
	Jonas Karlman <jonas@kwiboo.se>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	Neil Armstrong <neil.armstrong@linaro.org>,
	Rob Herring <robh@kernel.org>, Robert Foss <rfoss@kernel.org>,
	Simona Vetter <simona@ffwll.ch>,
	syyang@lontium.com, Thomas Zimmermann <tzimmermann@suse.de>,
	Prahlad Valluru <prahlad.valluru@oss.qualcomm.com>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 2/2] drm/bridge: add support for lontium lt8713sx bridge driver
Date: Fri, 20 Feb 2026 14:52:25 +0530	[thread overview]
Message-ID: <aZgn0WaVv9T3hLca@hu-vishsain-blr.qualcomm.com> (raw)
In-Reply-To: <91290a53-8f59-4138-9899-4523d25e1cff@web.de>

On Mon, Dec 29, 2025 at 01:40:10PM +0100, Markus Elfring wrote:
> …
> > +++ b/drivers/gpu/drm/bridge/lontium-lt8713sx.c
> > @@ -0,0 +1,682 @@
> …
> > +static int lt8713sx_firmware_update(struct lt8713sx *lt8713sx)
> > +{
> > +	int ret = 0;
> > +
> > +	mutex_lock(&lt8713sx->ocm_lock);
> > +	lt8713sx_i2c_enable(lt8713sx);
> …
> > +	mutex_unlock(&lt8713sx->ocm_lock);
> > +
> > +	return ret;
> > +}
> …
> 
> Under which circumstances would you become interested to apply a statement
> like “guard(mutex)(&lt8713sx->ocm_lock);”?
> https://elixir.bootlin.com/linux/v6.19-rc2/source/include/linux/mutex.h#L253

This function holds ocm_lock across the entire firmware update sequence and has multiple error exits. It is therefore a good candidate for guard(mutex) to simplify error handling and guarantee unlock on all paths. I will convert it to scoped locking using guard(mutex).
 
> Regards,
> Markus

      reply	other threads:[~2026-02-20  9:22 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-28 11:40 [PATCH v3 0/2] Add " Vishnu Saini
2025-12-28 11:40 ` [PATCH v3 1/2] dt-bindings: bridge: lt8713sx: Add bindings Vishnu Saini
2025-12-28 13:09   ` Krzysztof Kozlowski
2025-12-28 14:20   ` Dmitry Baryshkov
2026-02-20  6:24     ` Vishnu Saini
2025-12-28 11:40 ` [PATCH v3 2/2] drm/bridge: add support for lontium lt8713sx bridge driver Vishnu Saini
2025-12-28 15:01   ` Dmitry Baryshkov
2026-02-20  9:01     ` Vishnu Saini
2025-12-29 12:40   ` Markus Elfring
2026-02-20  9:22     ` Vishnu Saini [this message]

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=aZgn0WaVv9T3hLca@hu-vishsain-blr.qualcomm.com \
    --to=vishnu.saini@oss.qualcomm.com \
    --cc=Markus.Elfring@web.de \
    --cc=airlied@gmail.com \
    --cc=andrzej.hajda@intel.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jernej.skrabec@gmail.com \
    --cc=jonas@kwiboo.se \
    --cc=krzk+dt@kernel.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=prahlad.valluru@oss.qualcomm.com \
    --cc=rfoss@kernel.org \
    --cc=robh@kernel.org \
    --cc=simona@ffwll.ch \
    --cc=syyang@lontium.com \
    --cc=tzimmermann@suse.de \
    --cc=vvalluru@qti.qualcomm.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®