[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241219143236.udpywj7n56qahfrz@skbuf>
Date: Thu, 19 Dec 2024 16:32:36 +0200
From: Vladimir Oltean <olteanv@...il.com>
To: Tobias Waldekranz <tobias@...dekranz.com>
Cc: davem@...emloft.net, kuba@...nel.org, andrew@...n.ch,
f.fainelli@...il.com, netdev@...r.kernel.org, linux@...linux.org.uk,
chris.packham@...iedtelesis.co.nz, pabeni@...hat.com
Subject: Re: [PATCH v2 net 1/4] net: dsa: mv88e6xxx: Improve I/O related
error logging
On Thu, Dec 19, 2024 at 01:30:40PM +0100, Tobias Waldekranz wrote:
> +int mv88e6xxx_wait_mask(struct mv88e6xxx_chip *chip, int addr, int reg,
> + u16 mask, u16 val)
> +{
> + u16 last;
> + int err;
> +
> + err = _mv88e6xxx_wait_mask(chip, addr, reg, mask, val, &last);
> + if (!err)
> + return 0;
> +
> + dev_err(chip->dev,
> + "%s waiting for 0x%02x/0x%02x to match 0x%04x (mask:0x%04x last:0x%04x)\n",
> + (err == -ETIMEDOUT) ? "Timed out" : "Failed",
> + addr, reg, val, mask, last);
Would it help to use symbolic error names ("%pe", ERR_PTR(err))? You
wouldn't have to single out "Timed out", since it would print -ETIMEDOUT
and that should be pretty obvious already.
> + return err;
> +}
Powered by blists - more mailing lists