From: sashiko-bot@kernel.org
To: "Markus Stockhausen" <markus.stockhausen@gmx.de>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH net-next v13 08/11] net: mdio: realtek-rtl9300: Check for C45 support during setup
Date: Sat, 08 Aug 2026 17:12:29 +0000 [thread overview]
Message-ID: <20260808171230.8E16E1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260807171058.522833-9-markus.stockhausen@gmx.de>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The format string in `dev_err_probe` uses `%d` to print a `u32` variable (`bus`).
--
--- Patch [8]: [PATCH net-next v13 08/11] net: mdio: realtek-rtl9300: Check for C45 support during setup ---
commit e8d34ab1b625442557bbfb76ca4546a7c625a18a
Author: Markus Stockhausen <markus.stockhausen@gmx.de>
net: mdio: realtek-rtl9300: Check for C45 support during setup
This commit adds a consistency check in the mapping helper to abort setup if
the devicetree defines a C45 PHY for a device without C45 read/write
capabilities.
> diff --git a/drivers/net/mdio/mdio-realtek-rtl9300.c b/drivers/net/mdio/mdio-realtek-rtl9300.c
> index 88ba73b2ee812..22b1c4e05354c 100644
> --- a/drivers/net/mdio/mdio-realtek-rtl9300.c
> +++ b/drivers/net/mdio/mdio-realtek-rtl9300.c
> @@ -782,8 +782,14 @@ static int otto_emdio_map_ports(struct device *dev)
[ ... ]
> - if (of_device_is_compatible(phy_dn, "ethernet-phy-ieee802.3-c45"))
> + if (of_device_is_compatible(phy_dn, "ethernet-phy-ieee802.3-c45")) {
> + if (!priv->info->read_c45 || !priv->info->write_c45) {
> + err = dev_err_probe(dev, -EOPNOTSUPP,
> + "bus %d does not support C45 access\n", bus);
[Severity: Low]
This isn't a bug, but should this format string use %u instead of %d?
Since bus is a u32 variable, printing it with a signed format specifier is a
type mismatch. The value will likely remain small enough to print correctly
without overflowing, but using %u would be more precise.
> + goto put_nodes;
> + }
> priv->smi_bus_is_c45[bus] = true;
> + }
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260807171058.522833-1-markus.stockhausen@gmx.de?part=8
next prev parent reply other threads:[~2026-08-08 17:12 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-07 17:10 [PATCH net-next v13 00/11] net: mdio: realtek-rtl9300: Add RTL83xx support Markus Stockhausen
2026-08-07 17:10 ` [PATCH net-next v13 01/11] dt-bindings: net: realtek,rtl9301-mdio: Add RTL83xx series Markus Stockhausen
2026-08-07 17:10 ` [PATCH net-next v13 02/11] net: mdio: realtek-rtl9300: Add polling documentation Markus Stockhausen
2026-08-09 21:37 ` Andrew Lunn
2026-08-07 17:10 ` [PATCH net-next v13 03/11] net: phy: add (*notify_phy_attach/detach)() hooks to struct mii_bus Markus Stockhausen
2026-08-08 17:12 ` sashiko-bot
2026-08-09 21:44 ` Andrew Lunn
2026-08-10 18:29 ` AW: " Markus Stockhausen
2026-08-07 17:10 ` [PATCH net-next v13 04/11] net: mdio: realtek-rtl9300: suppress sysfs bind/unbind attributes Markus Stockhausen
2026-08-08 17:12 ` sashiko-bot
2026-08-07 17:10 ` [PATCH net-next v13 05/11] net: mdio: realtek-rtl9300: Configure hardware polling during probing Markus Stockhausen
2026-08-09 21:51 ` Andrew Lunn
2026-08-07 17:10 ` [PATCH net-next v13 06/11] net: mdio: realtek-rtl9300: Add page tracking Markus Stockhausen
2026-08-09 21:58 ` Andrew Lunn
2026-08-07 17:10 ` [PATCH net-next v13 07/11] net: mdio: realtek-rtl9300: Increase MDIO timeout Markus Stockhausen
2026-08-07 17:10 ` [PATCH net-next v13 08/11] net: mdio: realtek-rtl9300: Check for C45 support during setup Markus Stockhausen
2026-08-08 17:12 ` sashiko-bot [this message]
2026-08-09 22:13 ` Andrew Lunn
2026-08-07 17:10 ` [PATCH net-next v13 09/11] net: mdio: realtek-rtl9300: Add support for RTL838x Markus Stockhausen
2026-08-08 17:12 ` sashiko-bot
2026-08-09 22:15 ` Andrew Lunn
2026-08-07 17:10 ` [PATCH net-next v13 10/11] net: mdio: realtek-rtl9300: Add support for RTL839x Markus Stockhausen
2026-08-09 22:19 ` Andrew Lunn
2026-08-07 17:10 ` [PATCH net-next v13 11/11] net: mdio: realtek-rtl9300: reword Kconfig and module description Markus Stockhausen
2026-08-09 22:19 ` Andrew Lunn
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=20260808171230.8E16E1F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=markus.stockhausen@gmx.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 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.