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

Joey Lu a0987203069 at gmail.com
Tue Nov 19 21:08:14 AEDT 2024


Andrew Lunn 於 11/19/2024 9:48 AM 寫道:
>> +	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

Oops. That was my misuse; I will change it to minimum and maximum.

Thanks!

BR,

Joey

>
> ---
> pw-bot: cr


More information about the openbmc mailing list