Commit 3b42fbd5 authored by Rasmus Villemoes's avatar Rasmus Villemoes Committed by Jakub Kicinski
Browse files

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: default avatarRasmus Villemoes <linux@rasmusvillemoes.dk>
Reviewed-by: default avatarSimon Horman <simon.horman@corigine.com>
Acked-by: default avatarArun Ramadoss <arun.ramadoss@microchip.com>
Link: https://lore.kernel.org/r/20230620113855.733526-2-linux@rasmusvillemoes.dk


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 0c3d6fd4
Loading
Loading
Loading
Loading
+2 −11
Original line number Diff line number Diff line
@@ -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),
	return ksz_rmw8(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;
}

static inline void ksz_regmap_lock(void *__mtx)