devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Markus Probst" <markus.probst@posteo.de>
Cc: robh@kernel.org, devicetree@vger.kernel.org,
	"Alexandre Belloni" <alexandre.belloni@bootlin.com>,
	linux-rtc@vger.kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v7 5/6] rtc: s35390a: Add pinctrl
Date: Sat, 29 Aug 2026 14:32:17 +0000	[thread overview]
Message-ID: <20260829143218.3AB181F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260829-rtc_s35390a_int1-v7-5-debcd31143ae@posteo.de>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Mixing goto-based control flow with guard() cleanup in the same function.
--

commit dd254d343ff68630c82771ba28746846db1164dd
Author: Markus Probst <markus.probst@posteo.de>

rtc: s35390a: Add pinctrl

Allow configuration of pin functions, including keeping the previous 
configured function, disabling output, waking up the system, or 
minute periodical interrupt.

> diff --git a/drivers/rtc/rtc-s35390a.c b/drivers/rtc/rtc-s35390a.c
> index 12ed504db94d8..66ae58ac06ddd 100644
> --- a/drivers/rtc/rtc-s35390a.c
> +++ b/drivers/rtc/rtc-s35390a.c

[ ... ]

> +static int s35390a_pinctrl_set_mux(struct pinctrl_dev *pctldev, unsigned int function,
> +				   unsigned int group)
> +{
> +	int err;
> +	u8 status2, flag, mask;
> +	struct s35390a *s35390a = pinctrl_dev_get_drvdata(pctldev);
> +
> +	mask = group == 0 ? S35390A_INT1_MODE_MASK : S35390A_INT2_MODE_MASK;
> +
> +	guard(mutex)(&s35390a->pinfunction_lock);
> +
> +	dev_dbg(&s35390a->client[0]->dev, "%s: function=%d group=%d\n",
> +		__func__, function, group);
> +
> +	if (function == s35390a->pinfunction[group])
> +		return 0;
> +
> +	if (function == S35390A_FUNC_IGNORE)
> +		goto end;

[Severity: Low]
Does mixing goto-based control flow with guard() cleanup in the same function
violate the cleanup subsystem guidelines?

The cleanup subsystem explicitly discourages mixing goto statements with
scope-based cleanups like guard() in the same function to prevent ownership
ambiguity.

While the lock will still be correctly released here when going out of scope
at the target label, would it be better to avoid the goto and rely completely
on scope-based returns?

[ ... ]

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260829-rtc_s35390a_int1-v7-0-debcd31143ae@posteo.de?part=5

  reply	other threads:[~2026-08-29 14:32 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-29 14:22 [PATCH v7 0/6] rtc: s35390a: Allow use of output pin for interrupt signal 1 for wakealarm Markus Probst
2026-08-29 14:22 ` [PATCH v7 1/6] dt-bindings: rtc: Add pinctrl for S35390A Markus Probst
2026-08-29 14:32   ` sashiko-bot
2026-08-31 16:47   ` Conor Dooley
2026-08-29 14:22 ` [PATCH v7 3/6] rtc: s35390a: Fix alarm not disabling Markus Probst
2026-08-29 14:31   ` sashiko-bot
2026-08-29 14:22 ` [PATCH v7 2/6] rtc: s35390a: Add missing newline to dev_err Markus Probst
2026-08-29 14:32   ` sashiko-bot
2026-08-29 14:22 ` [PATCH v7 5/6] rtc: s35390a: Add pinctrl Markus Probst
2026-08-29 14:32   ` sashiko-bot [this message]
2026-08-29 14:22 ` [PATCH v7 4/6] rtc: s35390a: Read 24-hour mode on access Markus Probst
2026-08-29 14:37   ` sashiko-bot
2026-08-29 14:22 ` [PATCH v7 6/6] rtc: s35390a: Add synology quirk Markus Probst
2026-08-29 14:30   ` sashiko-bot

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=20260829143218.3AB181F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=alexandre.belloni@bootlin.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-rtc@vger.kernel.org \
    --cc=markus.probst@posteo.de \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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;
as well as URLs for NNTP newsgroup(s).