Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Paul Louvel" <paul.louvel@bootlin.com>
Cc: devicetree@vger.kernel.org, wsa+renesas@sang-engineering.com,
	robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v3 2/3] EDAC/cadence: Add Cadence DDR EDAC driver
Date: Thu, 24 Sep 2026 14:25:24 +0000	[thread overview]
Message-ID: <20260924142525.6FC771F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260924-paul-v7-3-rc1-edac-v3-2-bd8054a5b180@bootlin.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] build: build failure due to non-constant mask in FIELD_MODIFY()
--

commit 15d5e31eb920d20f3a957994bd91676f00f4633a
Author: Paul Louvel <paul.louvel@bootlin.com>

EDAC/cadence: Add Cadence DDR EDAC driver
    
Add the Cadence EDAC driver found on the Renesas RZ/N1x SoC. The driver 
adds support for single bit error correction, double bit error detection, 
and software scrubbing.

> diff --git a/drivers/edac/cadence_edac.c b/drivers/edac/cadence_edac.c
> new file mode 100644
> index 0000000000000..409cc792b534e
> --- /dev/null
> +++ b/drivers/edac/cadence_edac.c

[ ... ]

> +static void cdns_rmw(struct cdns_mc_priv *priv, u32 reg, u32 mask, u32 val)
> +{
> +	u32 regval;
> +
> +	mutex_lock(&priv->lock);
> +	regval = readl(priv->io_base + reg);
> +	FIELD_MODIFY(mask, &regval, val);

[Severity: Low]
Will this cause a build failure with certain compiler optimization levels?

FIELD_MODIFY() relies on __BF_FIELD_CHECK(), which requires the passed mask
to be a compile-time constant via a static assertion. Because cdns_rmw()
takes the mask as a parameter and is not explicitly marked inline, if the
compiler decides to outline this function, the mask loses its compile-time
constant property and will trigger a guaranteed build failure.

> +	writel(regval, priv->io_base + reg);
> +	mutex_unlock(&priv->lock);
> +}

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260924-paul-v7-3-rc1-edac-v3-0-bd8054a5b180@bootlin.com?part=2

  reply	other threads:[~2026-09-24 14:25 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-24 14:12 [PATCH v3 0/3] Add Renesas RZ/N1x EDAC driver Paul Louvel
2026-09-24 14:12 ` [PATCH v3 1/3] dt-bindings: edac: cdns,ddr-edac: add Cadence DDR EDAC binding Paul Louvel
2026-09-25 12:30   ` Wolfram Sang
2026-09-25 12:50     ` Miquel Raynal
2026-09-25 12:57       ` Geert Uytterhoeven
2026-09-25 13:14         ` Miquel Raynal
2026-09-24 14:12 ` [PATCH v3 2/3] EDAC/cadence: Add Cadence DDR EDAC driver Paul Louvel
2026-09-24 14:25   ` sashiko-bot [this message]
2026-09-25 12:18     ` Wolfram Sang
2026-09-28  7:41       ` Paul Louvel
2026-09-25 12:02   ` Wolfram Sang
2026-09-28  7:32     ` Paul Louvel
2026-09-24 14:12 ` [PATCH v3 3/3] ARM: dts: renesas: r9a06g032: add EDAC node Paul Louvel
2026-09-25 12:19   ` Wolfram Sang

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=20260924142525.6FC771F000FF@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=paul.louvel@bootlin.com \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=wsa+renesas@sang-engineering.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