Re: [PATCH v3 3/3] net: stmmac: dwmac-nuvoton: Add dwmac glue for Nuvoton MA35 family

From: Andrew Lunn
Date: Mon Nov 18 2024 - 20:49:07 EST


> + if (of_property_read_u32(dev->of_node, "tx-internal-delay-ps", &arg)) {
> + tx_delay = 0; /* Default value is 0 */
> + } else {
> + if (arg <= 2000) {
> + tx_delay = (arg == 2000) ? 0xF : (arg / PATH_DELAY_DEC);
> + dev_dbg(dev, "Set Tx path delay to 0x%x\n", tx_delay);

The device tree binding says:

+ tx-internal-delay-ps:
+ enum: [0, 2000]


So only two values are allowed. Yet the C code is

arg / PATH_DELAY_DEC

which seems to allow 16 values?

Please make this consistent.


Andrew

---
pw-bot: cr