From: Christian Marangi <ansuelsmth@gmail.com>
To: sashiko-reviews@lists.linux.dev
Cc: lee@kernel.org, mfd@lists.linux.dev, conor+dt@kernel.org,
devicetree@vger.kernel.org, robh@kernel.org
Subject: Re: [PATCH net-next v25 04/10] mfd: an8855: Add support for Airoha AN8855 Switch
Date: Mon, 12 Oct 2026 14:02:19 +0200 [thread overview]
Message-ID: <6acccc4e.4c22a69b.132624.271f@mx.google.com> (raw)
In-Reply-To: <sashiko-outbox-166721@kernel.org>
On Sat, Oct 10, 2026 at 04:11:40PM +0000, sashiko-bot@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
> - [Medium] mfd: overlapping regmap readable ranges for General Purpose and GPU timers
> - [Low] mfd: structure and variable naming violates MFD API guidelines
> --
>
> commit 05d4dc95b969f0fcf66d11398aafad3e7eb7c7f1
> Author: Christian Marangi <ansuelsmth@gmail.com>
>
> mfd: an8855: Add support for Airoha AN8855 Switch
>
> This commit adds support for the Airoha AN8855 Switch which provides
> a DSA switch and a NVMEM provider. It utilizes the mdio-regmap driver
> and registers a regmap for each internal PHY.
>
> > diff --git a/drivers/mfd/airoha-an8855.c b/drivers/mfd/airoha-an8855.c
> > new file mode 100644
> > index 0000000000000..a2778511dfefc
> > --- /dev/null
> > +++ b/drivers/mfd/airoha-an8855.c
> [ ... ]
> > +static const struct regmap_range an8855_readable_ranges[] = {
> [ ... ]
> > + regmap_reg_range(0x10009000, 0x10009fff), /* PDMA */
> > + regmap_reg_range(0x1000a100, 0x1000a2ff), /* General Purpose Timer */
> > + regmap_reg_range(0x1000a200, 0x1000a2ff), /* GPU timer */
>
> [Severity: Medium]
> Is this range definition correct? The General Purpose Timer range
> (0x1000a100 to 0x1000a2ff) fully overlaps with the GPU timer range
> (0x1000a200 to 0x1000a2ff).
>
> Could this be a typo in the hardware memory map definition? It seems like
> the General Purpose Timer range might have been intended to end at
> 0x1000a1ff to avoid overlapping and potential register access boundary
> issues.
>
I have to double check this from documentation, but if possible I would
like to fix this with a followup patch.
> [ ... ]
> > +static int an8855_core_probe(struct mdio_device *mdiodev)
> > +{
> > + struct an8855_phy_bus phy_bus_infos[AN8855_MAX_PHY_PORT] = { };
> > + struct device *dev = &mdiodev->dev;
> > + struct an8855_core *priv;
> > + struct regmap *regmap;
> > + int num_phys;
> > + int i, ret;
> > +
> > + priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
>
> [Severity: Low]
> This isn't a bug, but does this variable and structure naming align with MFD
> subsystem conventions?
>
> The MFD guidelines suggest avoiding generic variable names like priv, and
> instead recommend using ddata for the instance variable. Also, should the
> struct name itself avoid hardcoding implementation details like core?
> Naming it something closer to struct an8855 might better adhere to the
> subsystem guidelines.
>
I already updated the struct, is it needed to also update the local
variables?
> --
> Sashiko AI review · https://sashiko.dev/#/patchset/20261009161102.38961-1-ansuelsmth@gmail.com?part=4
--
Ansuel
next prev parent reply other threads:[~2026-10-12 12:02 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-09 16:10 [PATCH net-next v25 00/10] net: dsa: Add Airoha AN8855 support Christian Marangi
2026-10-09 16:10 ` [PATCH net-next v25 01/10] dt-bindings: net: dsa: Document support for Airoha AN8855 DSA Switch Christian Marangi
2026-10-10 16:11 ` sashiko-bot
2026-10-09 16:10 ` [PATCH net-next v25 02/10] dt-bindings: net: Document support for AN8855 Switch Internal PHY Christian Marangi
2026-10-10 16:11 ` sashiko-bot
2026-10-10 16:19 ` netdev-bot+sashiko
2026-10-09 16:10 ` [PATCH net-next v25 03/10] dt-bindings: mfd: Document support for Airoha AN8855 Switch SoC Christian Marangi
2026-10-10 16:11 ` sashiko-bot
2026-10-10 16:19 ` netdev-bot+sashiko
2026-10-09 16:10 ` [PATCH net-next v25 04/10] mfd: an8855: Add support for Airoha AN8855 Switch Christian Marangi
2026-10-10 16:11 ` sashiko-bot
2026-10-12 12:02 ` Christian Marangi [this message]
2026-10-10 16:19 ` netdev-bot+sashiko
2026-10-09 16:10 ` [PATCH net-next v25 05/10] net: phy: Add Airoha AN8855 Internal Switch Gigabit PHY Christian Marangi
2026-10-10 16:11 ` sashiko-bot
2026-10-12 12:03 ` Christian Marangi
2026-10-10 16:19 ` netdev-bot+sashiko
2026-10-09 16:10 ` [PATCH net-next v25 06/10] net: dsa: tag_mtk: add Airoha variant usage of this TAG Christian Marangi
2026-10-10 16:11 ` sashiko-bot
2026-10-12 12:04 ` Christian Marangi
2026-10-10 16:19 ` netdev-bot+sashiko
2026-10-09 16:10 ` [PATCH net-next v25 07/10] MAINTAINERS: add myself as maintainer for Airoha AN8855 Switch Christian Marangi
2026-10-09 16:10 ` [PATCH net-next v25 08/10] net: dsa: move mediatek DSA driver in dedicated directory Christian Marangi
2026-10-10 16:11 ` sashiko-bot
2026-10-09 16:10 ` [PATCH net-next v25 09/10] net: dsa: mt7530: generalize and move common function to lib module Christian Marangi
2026-10-10 16:11 ` sashiko-bot
2026-10-12 12:06 ` Christian Marangi
2026-10-10 16:19 ` netdev-bot+sashiko
2026-10-09 16:10 ` [PATCH net-next v25 10/10] net: dsa: Add Airoha AN8855 5-Port Gigabit DSA Switch driver Christian Marangi
2026-10-10 16:11 ` sashiko-bot
2026-10-12 12:11 ` Christian Marangi
2026-10-10 16:19 ` netdev-bot+sashiko
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=6acccc4e.4c22a69b.132624.271f@mx.google.com \
--to=ansuelsmth@gmail.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=lee@kernel.org \
--cc=mfd@lists.linux.dev \
--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