diff options
author | Rasmus Villemoes <linux@rasmusvillemoes.dk> | 2023-06-20 13:38:52 +0200 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2023-06-23 04:48:37 +0200 |
commit | 3b42fbd5951171bce5ecd22ad72d6a16fefaa704 (patch) | |
tree | 8611531e13f4021e12c86d6ae780904c23858b25 /drivers/net/dsa/microchip/ksz_common.h | |
parent | tools: ynl: improve the direct-include header guard logic (diff) | |
download | linux-3b42fbd5951171bce5ecd22ad72d6a16fefaa704.tar.xz linux-3b42fbd5951171bce5ecd22ad72d6a16fefaa704.zip |
net: dsa: microchip: simplify ksz_prmw8()
Implement ksz_prmw8() in terms of ksz_rmw8(), just as all the other
ksz_pX are implemented in terms of ksz_X. No functional change.
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Acked-by: Arun Ramadoss <arun.ramadoss@microchip.com>
Link: https://lore.kernel.org/r/20230620113855.733526-2-linux@rasmusvillemoes.dk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/dsa/microchip/ksz_common.h')
-rw-r--r-- | drivers/net/dsa/microchip/ksz_common.h | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/drivers/net/dsa/microchip/ksz_common.h b/drivers/net/dsa/microchip/ksz_common.h index a66b56857ec6..2453c43c48a5 100644 --- a/drivers/net/dsa/microchip/ksz_common.h +++ b/drivers/net/dsa/microchip/ksz_common.h @@ -578,17 +578,8 @@ static inline int ksz_pwrite32(struct ksz_device *dev, int port, int offset, static inline int ksz_prmw8(struct ksz_device *dev, int port, int offset, u8 mask, u8 val) { - int ret; - - ret = regmap_update_bits(ksz_regmap_8(dev), - dev->dev_ops->get_port_addr(port, offset), - mask, val); - if (ret) - dev_err(dev->dev, "can't rmw 8bit reg 0x%x: %pe\n", - dev->dev_ops->get_port_addr(port, offset), - ERR_PTR(ret)); - - return ret; + return ksz_rmw8(dev, dev->dev_ops->get_port_addr(port, offset), + mask, val); } static inline void ksz_regmap_lock(void *__mtx) |