casaroli opened a new pull request, #21055: URL: https://github.com/apache/nuttx/pull/21055
## Summary `lpc54_eth_ioctl()` in `arch/arm/src/lpc54xx/lpc54_ethernet.c` does not compile: - With `CONFIG_NETDEV_PHY_IOCTL`, `ret = OK` has no semicolon in the `SIOCGMIIREG` and `SIOCSMIIREG` cases. - With net error output (`CONFIG_DEBUG_NET_ERROR`), `nerr()` uses `command`, but the parameter is `cmd`. Also, the function sets `ret` but always returns `OK`. It now returns `ret`, with `-ENOTTY` for an unknown command, as the other Ethernet drivers do (for example `lpc17_40_ethernet.c`). The first commit fixes the old nxstyle errors of the file (white space only), because checkpatch checks the whole file. It has the same changes to this file as the white space commit of #21053, so the two PRs merge in either order. ## Impact Only boards with LPC54xx Ethernet and `CONFIG_NETDEV_IOCTL`. These configurations compile now; the PHY ioctl commands return their result. ## Testing `lpcxpresso-lpc54628:netnsh`, master and this PR: | Configuration | master | this PR | | --- | --- | --- | | `netnsh` as it is | builds (`lpc54_eth_ioctl()` is not compiled: no `CONFIG_NETDEV_IOCTL`) | builds | | `netnsh` + `CONFIG_NETDEV_PHY_IOCTL` + `CONFIG_DEBUG_NET_ERROR` | fails: `expected ';' before '}' token` (lines 2245 and 2254), `'command' undeclared`, and `variable 'ret' set but not used` | builds; no warning in `lpc54_ethernet.c` | `tools/checkpatch.sh -c -u -m -g` passes. No change to Documentation/ is needed. No LPC54xx board is available to me, so this is a build test only. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
