2023-06-20 11:56:54

by Rasmus Villemoes

[permalink] [raw]
Subject: [PATCH net-next 1/3] 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 <[email protected]>
---
drivers/net/dsa/microchip/ksz_common.h | 13 ++-----------
1 file 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)
--
2.37.2



2023-06-20 16:27:53

by Simon Horman

[permalink] [raw]
Subject: Re: [PATCH net-next 1/3] net: dsa: microchip: simplify ksz_prmw8()

On Tue, Jun 20, 2023 at 01:38:52PM +0200, Rasmus Villemoes wrote:
> 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 <[email protected]>

Reviewed-by: Simon Horman <[email protected]>


2023-06-22 03:56:51

by Arun Ramadoss

[permalink] [raw]
Subject: Re: [PATCH net-next 1/3] net: dsa: microchip: simplify ksz_prmw8()

On Tue, 2023-06-20 at 13:38 +0200, Rasmus Villemoes wrote:
> [Some people who received this message don't often get email from
> [email protected]. Learn why this is important at
> https://aka.ms/LearnAboutSenderIdentification ]
>
> EXTERNAL EMAIL: Do not click links or open attachments unless you
> know the content is safe
>
> 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 <[email protected]>

Acked-by: Arun Ramadoss <[email protected]>

>