From: sashiko-bot@kernel.org
To: "Ciprian Regus via B4 Relay"
<devnull+ciprian.regus.analog.com@kernel.org>
Cc: devicetree@vger.kernel.org, conor+dt@kernel.org, robh@kernel.org
Subject: Re: [PATCH net-next v2 04/10] net: ethernet: oa_tc6: Export the C45 access functions
Date: Sat, 30 May 2026 00:49:16 +0000 [thread overview]
Message-ID: <20260530004917.5B10F1F00898@smtp.kernel.org> (raw)
In-Reply-To: <20260527-adin1140-driver-v2-4-37e5c8d4e0a0@analog.com>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
New issues:
- [Low] Missing forward declaration for `struct mii_bus` in `include/linux/oa_tc6.h`.
Pre-existing issues:
- [High] `oa_tc6_mdiobus_read` silently masks negative error codes into `1` due to using a `bool` type for the return code variable.
--
commit 4bde583a95e265a961f05530eea079dbd8883081
Author: Ciprian Regus <ciprian.regus@analog.com>
net: ethernet: oa_tc6: Export the C45 access functions
The C45 access functions can still be used by some Ethernet drivers
which set the OA_TC6_BROKEN_PHY flag. Export them.
> diff --git a/drivers/net/ethernet/oa_tc6.c b/drivers/net/ethernet/oa_tc6.c
> index 7ae3639beaddd..4a1fd9fd75abe 100644
> --- a/drivers/net/ethernet/oa_tc6.c
> +++ b/drivers/net/ethernet/oa_tc6.c
> @@ -499,8 +499,8 @@ static int oa_tc6_get_phy_c45_mms(int devnum)
> }
> }
>
> -static int oa_tc6_mdiobus_read_c45(struct mii_bus *bus, int addr, int devnum,
> - int regnum)
> +int oa_tc6_mdiobus_read_c45(struct mii_bus *bus, int addr, int devnum,
> + int regnum)
[Severity: High]
This is a pre-existing issue, but looking closely at the related
oa_tc6_mdiobus_read() function in this file, it declares the return value
variable as a bool:
static int oa_tc6_mdiobus_read(struct mii_bus *bus, int addr, int regnum)
{
...
bool ret;
ret = oa_tc6_read_register(...);
if (ret)
return ret;
Could this cause negative error codes like -EPROTO to be silently masked into
1, which the MDIO subsystem might treat as a successful read of 0x0001?
Should the type of ret be changed to int here?
[ ... ]
> diff --git a/include/linux/oa_tc6.h b/include/linux/oa_tc6.h
> index 6c38bf49e2a7e..95e041d7d77b6 100644
> --- a/include/linux/oa_tc6.h
> +++ b/include/linux/oa_tc6.h
> @@ -32,3 +32,7 @@ int oa_tc6_read_registers(struct oa_tc6 *tc6, u32 address, u32 value[],
> u8 length);
> netdev_tx_t oa_tc6_start_xmit(struct oa_tc6 *tc6, struct sk_buff *skb);
> int oa_tc6_zero_align_receive_frame_enable(struct oa_tc6 *tc6);
> +int oa_tc6_mdiobus_read_c45(struct mii_bus *bus, int addr, int devnum,
> + int regnum);
[Severity: Low]
Does this header file need a forward declaration for struct mii_bus?
If another file includes linux/oa_tc6.h without first including mdio.h or
phy.h, this might cause compiler warnings or errors since struct mii_bus
has not been declared yet.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260527-adin1140-driver-v2-0-37e5c8d4e0a0@analog.com?part=4
next prev parent reply other threads:[~2026-05-30 0:49 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-26 21:51 [PATCH net-next v2 00/10] net: Add ADIN1140 support Ciprian Regus via B4 Relay
2026-05-26 21:51 ` [PATCH net-next v2 01/10] dt-bindings: net: Add ADIN1140 Ciprian Regus via B4 Relay
2026-05-27 15:11 ` Conor Dooley
2026-05-28 16:46 ` Regus, Ciprian
2026-05-28 17:18 ` Conor Dooley
2026-05-26 21:51 ` [PATCH net-next v2 02/10] net: ethernet: oa_tc6: Handle the OA TC6 SPI protected mode Ciprian Regus via B4 Relay
2026-05-30 0:49 ` sashiko-bot
2026-05-26 21:51 ` [PATCH net-next v2 03/10] net: ethernet: oa_tc6: add OA_TC6_BROKEN_PHY quirk flag Ciprian Regus via B4 Relay
2026-05-28 2:12 ` Andrew Lunn
2026-05-30 0:49 ` sashiko-bot
2026-05-26 21:51 ` [PATCH net-next v2 04/10] net: ethernet: oa_tc6: Export the C45 access functions Ciprian Regus via B4 Relay
2026-05-28 2:13 ` Andrew Lunn
2026-05-30 0:49 ` sashiko-bot [this message]
2026-05-26 21:51 ` [PATCH net-next v2 05/10] net: ethernet: oa_tc6: Export standard defined registers Ciprian Regus via B4 Relay
2026-05-28 2:21 ` Andrew Lunn
2026-05-26 21:51 ` [PATCH net-next v2 06/10] net: ethernet: oa_tc6: Add MMS register formatting macro Ciprian Regus via B4 Relay
2026-05-28 2:31 ` Andrew Lunn
2026-05-26 21:51 ` [PATCH net-next v2 07/10] net: phy: add generic helpers for direct C45 MMD access Ciprian Regus via B4 Relay
2026-05-28 2:33 ` Andrew Lunn
2026-05-26 21:51 ` [PATCH net-next v2 08/10] net: phy: microchip-t1s: use generic C45 MMD access helpers Ciprian Regus via B4 Relay
2026-05-28 2:33 ` Andrew Lunn
2026-05-26 21:51 ` [PATCH net-next v2 09/10] net: phy: Add support for the ADIN1140 PHY Ciprian Regus via B4 Relay
2026-05-28 2:50 ` Andrew Lunn
2026-05-26 21:51 ` [PATCH net-next v2 10/10] net: ethernet: adi: Add a driver for the ADIN1140 MACPHY Ciprian Regus via B4 Relay
2026-05-28 3:10 ` Andrew Lunn
2026-05-28 12:43 ` Regus, Ciprian
2026-05-28 14:05 ` Andrew Lunn
2026-05-29 9:21 ` Nuno Sá
2026-05-29 13:03 ` Andrew Lunn
2026-05-30 0:49 ` 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=20260530004917.5B10F1F00898@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=devnull+ciprian.regus.analog.com@kernel.org \
--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