mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-10 20:48:12 +00:00
net: dsa: mt7530: replace mt7530_read with regmap_read
Replace all mt7530_read() calls with direct regmap_read() calls and remove the wrapper function. The wrapper returned 0 on failed reads; preserve that behaviour by zeroing the read-back buffer at the start of mt7530_regmap_read(), so callers that do not check the return code keep seeing a deterministic value. The WARN_ON_ONCE error logging is dropped. Most callsites follow the val = mt7530_read(priv, reg) pattern and are converted mechanically using the following semantic patch: @@ expression priv, reg; identifier val; @@ -val = mt7530_read(priv, reg); +regmap_read(priv->regmap, reg, &val); Remaining inline uses are converted by hand. Signed-off-by: Daniel Golle <daniel@makrotopia.org> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://patch.msgid.link/a1dc338ae368554ec6faa974df7ba6f3660ae12b.1788190568.git.daniel@makrotopia.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
f6692ee8de
commit
10d9d8328e
2 changed files with 60 additions and 56 deletions
Loading…
Add table
Add a link
Reference in a new issue