This is an automated email from the ASF dual-hosted git repository. acassis pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 8e9737dde906cc3fc602fb0927207e793c7b444f Author: Marco Casaroli <[email protected]> AuthorDate: Tue Oct 27 20:38:24 2026 +0100 arch/arm/lpc54xx: Fix lpc54_eth_ioctl() so that it compiles. lpc54_eth_ioctl() did not compile: - With CONFIG_NETDEV_PHY_IOCTL, "ret = OK" has no semicolon in the SIOCGMIIREG and SIOCSMIIREG cases. - With net error output, nerr() uses "command", but the parameter is "cmd". Also, the function set ret but always returned OK. Return ret, and set it to -ENOTTY for an unknown command, as the other Ethernet drivers do. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Marco Casaroli <[email protected]> --- arch/arm/src/lpc54xx/lpc54_ethernet.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/arch/arm/src/lpc54xx/lpc54_ethernet.c b/arch/arm/src/lpc54xx/lpc54_ethernet.c index 63a8c16dfae..f07103ec2bd 100644 --- a/arch/arm/src/lpc54xx/lpc54_ethernet.c +++ b/arch/arm/src/lpc54xx/lpc54_ethernet.c @@ -2244,7 +2244,7 @@ static int lpc54_eth_ioctl(struct net_driver_s *dev, int cmd, (struct mii_ioctl_data_s *)((uintptr_t)arg); req->val_out = lpc54_phy_read(priv, req->reg_num); - ret = OK + ret = OK; } break; @@ -2254,17 +2254,18 @@ static int lpc54_eth_ioctl(struct net_driver_s *dev, int cmd, (struct mii_ioctl_data_s *)((uintptr_t)arg); lpc54_phy_write(priv, req->reg_num, req->val_in); - ret = OK + ret = OK; } break; #endif /* ifdef CONFIG_NETDEV_PHY_IOCTL */ default: - nerr("ERROR: Unrecognized IOCTL command: %d\n", command); - return -ENOTTY; /* Special return value for this case */ + nerr("ERROR: Unrecognized IOCTL command: %d\n", cmd); + ret = -ENOTTY; /* Special return value for this case */ + break; } - return OK; + return ret; } #endif
