All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Khristine Andreea Barbulescu" <khristineandreea.barbulescu@oss.nxp.com>
Cc: linux-gpio@vger.kernel.org
Subject: Re: [PATCH v3] pinctrl: nxp: s32g2: Enable by default on ARCH_S32
Date: Thu, 05 Nov 2026 14:22:50 +0000	[thread overview]
Message-ID: <sashiko-outbox-199237@kernel.org> (raw)
In-Reply-To: <20261105141347.488850-1-khristineandreea.barbulescu@oss.nxp.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] pinctrl: nxp: s32g2: broken COMPILE_TEST prompt with strict ARCH_S32 dependency
--

commit 065380d0c7f62b7d0370fd1bcacf175935178d8a
Author: Khristine Andreea Barbulescu <khristineandreea.barbulescu@oss.nxp.com>

pinctrl: nxp: s32g2: Enable by default on ARCH_S32

This commit enables PINCTRL_S32G2 by default on ARCH_S32 and restricts its
Kconfig prompt to COMPILE_TEST so that S32G boards have the SIUL2 pin
controller driver built in by default.

> diff --git a/drivers/pinctrl/nxp/Kconfig b/drivers/pinctrl/nxp/Kconfig
> index abca7ef97003d..d6d97c944b94e 100644
> --- a/drivers/pinctrl/nxp/Kconfig
> +++ b/drivers/pinctrl/nxp/Kconfig
> @@ -8,8 +8,14 @@ config PINCTRL_S32CC
>  	select REGMAP_MMIO
>  
>  config PINCTRL_S32G2
> +	bool "NXP S32G2 pinctrl driver" if COMPILE_TEST
>  	depends on ARCH_S32 && OF
> -	bool "NXP S32G2 pinctrl driver"
> +	default ARCH_S32
>  	select PINCTRL_S32CC

[Severity: Medium]
As reported by Sashiko on v2 [1], does gating the PINCTRL_S32G2 prompt on
COMPILE_TEST work as intended when both PINCTRL_S32G2 and PINCTRL_S32CC keep
a strict dependency on ARCH_S32 && OF?

In drivers/pinctrl/nxp/Kconfig, PINCTRL_S32CC also requires ARCH_S32:

config PINCTRL_S32CC
	bool
	depends on ARCH_S32 && OF

Because a symbol's depends on expression bounds its prompt visibility, the
prompt and help text for PINCTRL_S32G2 are only reachable when ARCH_S32, OF,
and COMPILE_TEST are all enabled simultaneously.

When ARCH_S32=n and COMPILE_TEST=y, depends on ARCH_S32 && OF evaluates to n
on both PINCTRL_S32G2 and PINCTRL_S32CC, preventing the driver from being
enabled for compile-testing on non-ARCH_S32 builds.

Conversely, when ARCH_S32=y and COMPILE_TEST=n, the prompt is hidden and
PINCTRL_S32G2 is forced to y with no way to disable it, even when building
for non-S32G platforms in the ARCH_S32 family found in
arch/arm64/boot/dts/freescale/Makefile:

dtb-$(CONFIG_ARCH_S32) += s32g274a-evb.dtb
dtb-$(CONFIG_ARCH_S32) += s32g274a-rdb2.dtb
dtb-$(CONFIG_ARCH_S32) += s32g399a-rdb3.dtb
dtb-$(CONFIG_ARCH_S32) += s32n79-rdb.dtb
dtb-$(CONFIG_ARCH_S32) += s32v234-evb.dtb

Should both PINCTRL_S32G2 and PINCTRL_S32CC instead use depends on
(ARCH_S32 || COMPILE_TEST) && OF (or keep the prompt visible so non-S32G
ARCH_S32 builds can disable PINCTRL_S32G2)?

[1] https://lore.kernel.org/r/20261104113905.96582-1-khristineandreea.barbulescu@oss.nxp.com

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261105141347.488850-1-khristineandreea.barbulescu@oss.nxp.com?part=1

      reply	other threads:[~2026-11-05 14:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-05 14:13 [PATCH v3] pinctrl: nxp: s32g2: Enable by default on ARCH_S32 Khristine Andreea Barbulescu
2026-11-05 14:22 ` sashiko-bot [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=sashiko-outbox-199237@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=khristineandreea.barbulescu@oss.nxp.com \
    --cc=linux-gpio@vger.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 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.