All of lore.kernel.org
 help / color / mirror / Atom feed
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Alexey Charkov <alchark@flipper.net>
Cc: Srinivas Kandagatla <srini@kernel.org>,
	 Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	 Conor Dooley <conor+dt@kernel.org>,
	 Heiko Stuebner <heiko@sntech.de>,
	 Michael Walle <michael@walle.cc>,
	 Finley Xiao <finley.xiao@rock-chips.com>,
	 Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	 devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	 linux-rockchip@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org,  stable@vger.kernel.org
Subject: Re: [PATCH 1/4] nvmem: rockchip-otp: Serialize reads
Date: Thu, 03 Sep 2026 10:06:08 +0200	[thread overview]
Message-ID: <87bjae7o9b.fsf@bootlin.com> (raw)
In-Reply-To: <CAKTNdwF_wY8JSoQs=auK_9YNGT+hwQ=dAhcRVsf1E1CVvFs-XA@mail.gmail.com> (Alexey Charkov's message of "Wed, 2 Sep 2026 16:40:16 +0400")

Hi Alexey,

>> I haven't seen Sashiko's answer but isn't the goal of guards to just be
>> released whatever the actual return path?
>
> I believe it's based on the guidance in [1]. In this particular case,
> gotos don't jump outside the scope where I put the guard, so the
> scope-based guard is still correct. However, stylistically, it is
> indeed uncommon to see scope-based guards in functions using gotos.
> Explicit lock/unlock is easy in this case, anyway.
>
> [1] https://elixir.bootlin.com/linux/v7.2.2/source/include/linux/cleanup.h#L148-L153

I never read that paragraph before, but okay, makes sense.

Thanks,
Miquèl


WARNING: multiple messages have this Message-ID (diff)
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Alexey Charkov <alchark@flipper.net>
Cc: Srinivas Kandagatla <srini@kernel.org>,
	 Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	 Conor Dooley <conor+dt@kernel.org>,
	 Heiko Stuebner <heiko@sntech.de>,
	 Michael Walle <michael@walle.cc>,
	 Finley Xiao <finley.xiao@rock-chips.com>,
	 Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	 devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	 linux-rockchip@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org,  stable@vger.kernel.org
Subject: Re: [PATCH 1/4] nvmem: rockchip-otp: Serialize reads
Date: Thu, 03 Sep 2026 10:06:08 +0200	[thread overview]
Message-ID: <87bjae7o9b.fsf@bootlin.com> (raw)
In-Reply-To: <CAKTNdwF_wY8JSoQs=auK_9YNGT+hwQ=dAhcRVsf1E1CVvFs-XA@mail.gmail.com> (Alexey Charkov's message of "Wed, 2 Sep 2026 16:40:16 +0400")

Hi Alexey,

>> I haven't seen Sashiko's answer but isn't the goal of guards to just be
>> released whatever the actual return path?
>
> I believe it's based on the guidance in [1]. In this particular case,
> gotos don't jump outside the scope where I put the guard, so the
> scope-based guard is still correct. However, stylistically, it is
> indeed uncommon to see scope-based guards in functions using gotos.
> Explicit lock/unlock is easy in this case, anyway.
>
> [1] https://elixir.bootlin.com/linux/v7.2.2/source/include/linux/cleanup.h#L148-L153

I never read that paragraph before, but okay, makes sense.

Thanks,
Miquèl

_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

  reply	other threads:[~2026-09-03  8:06 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-01 15:33 [PATCH 0/4] nvmem: Derive Rockchip MAC addresses from the OTP CPU ID Alexey Charkov
2026-09-01 15:33 ` Alexey Charkov
2026-09-01 15:33 ` [PATCH 1/4] nvmem: rockchip-otp: Serialize reads Alexey Charkov
2026-09-01 15:33   ` Alexey Charkov
2026-09-01 15:39   ` sashiko-bot
2026-09-02  9:10   ` Miquel Raynal
2026-09-02  9:10     ` Miquel Raynal
2026-09-02  9:24     ` Alexey Charkov
2026-09-02  9:24       ` Alexey Charkov
2026-09-02 10:17       ` Miquel Raynal
2026-09-02 10:17         ` Miquel Raynal
2026-09-02 12:40         ` Alexey Charkov
2026-09-02 12:40           ` Alexey Charkov
2026-09-03  8:06           ` Miquel Raynal [this message]
2026-09-03  8:06             ` Miquel Raynal
2026-09-01 15:33 ` [PATCH 2/4] dt-bindings: nvmem: layouts: Add Rockchip OTP CPUID layout Alexey Charkov
2026-09-01 15:33   ` Alexey Charkov
2026-09-01 15:33 ` [PATCH 3/4] nvmem: layouts: Add Rockchip OTP CPUID layout driver Alexey Charkov
2026-09-01 15:33   ` Alexey Charkov
2026-09-01 16:03   ` sashiko-bot
2026-09-02  9:40   ` Miquel Raynal
2026-09-02  9:40     ` Miquel Raynal
2026-09-01 15:33 ` [PATCH 4/4] arm64: dts: rockchip: Derive GMAC MAC addresses from OTP on RK3576 Alexey Charkov
2026-09-01 15:33   ` Alexey Charkov

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=87bjae7o9b.fsf@bootlin.com \
    --to=miquel.raynal@bootlin.com \
    --cc=alchark@flipper.net \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=finley.xiao@rock-chips.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=heiko@sntech.de \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=michael@walle.cc \
    --cc=robh@kernel.org \
    --cc=srini@kernel.org \
    --cc=stable@vger.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.