Re: [PATCH net-next v1 04/14] net: phy: nxp-c45-tja11xx: add *_reg_field functions

From: Andrew Lunn
Date: Fri Jun 16 2023 - 16:43:04 EST


> +static int nxp_c45_read_reg_field(struct phy_device *phydev,
> + const struct nxp_c45_reg_field *reg_field)
> +{
> + u16 mask;
> + int ret;
> +
> + if (reg_field->size == 0) {
> + phydev_warn(phydev, "Trying to read a reg field of size 0.");

I would actually use phydev_err().

> + if (reg_field->size == 0) {
> + phydev_warn(phydev, "Trying to write a reg field of size 0.");

Here as well.


Andrew

---
pw-bot: cr