Skip to content

Commit 3b42fbd

Browse files
Villemoeskuba-moo
authored andcommitted
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>
1 parent 0c3d6fd commit 3b42fbd

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

drivers/net/dsa/microchip/ksz_common.h

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -578,17 +578,8 @@ static inline int ksz_pwrite32(struct ksz_device *dev, int port, int offset,
578578
static inline int ksz_prmw8(struct ksz_device *dev, int port, int offset,
579579
u8 mask, u8 val)
580580
{
581-
int ret;
582-
583-
ret = regmap_update_bits(ksz_regmap_8(dev),
584-
dev->dev_ops->get_port_addr(port, offset),
585-
mask, val);
586-
if (ret)
587-
dev_err(dev->dev, "can't rmw 8bit reg 0x%x: %pe\n",
588-
dev->dev_ops->get_port_addr(port, offset),
589-
ERR_PTR(ret));
590-
591-
return ret;
581+
return ksz_rmw8(dev, dev->dev_ops->get_port_addr(port, offset),
582+
mask, val);
592583
}
593584

594585
static inline void ksz_regmap_lock(void *__mtx)

0 commit comments

Comments
 (0)