public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Rasmus Villemoes <linux@rasmusvillemoes.dk>
To: Woojung Huh <woojung.huh@microchip.com>,
	UNGLinuxDriver@microchip.com, Andrew Lunn <andrew@lunn.ch>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Vladimir Oltean <olteanv@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>
Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH net-next 1/3] net: dsa: microchip: simplify ksz_prmw8()
Date: Tue, 20 Jun 2023 13:38:52 +0200	[thread overview]
Message-ID: <20230620113855.733526-2-linux@rasmusvillemoes.dk> (raw)
In-Reply-To: <20230620113855.733526-1-linux@rasmusvillemoes.dk>

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>
---
 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


  reply	other threads:[~2023-06-20 11:41 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-20 11:38 [PATCH net-next 0/3] net: dsa: microchip: fix writes to phy registers >= 0x10 Rasmus Villemoes
2023-06-20 11:38 ` Rasmus Villemoes [this message]
2023-06-20 16:04   ` [PATCH net-next 1/3] net: dsa: microchip: simplify ksz_prmw8() Simon Horman
2023-06-22  3:48   ` Arun.Ramadoss
2023-06-20 11:38 ` [PATCH net-next 2/3] net: dsa: microchip: add ksz_prmw32() helper Rasmus Villemoes
2023-06-20 16:14   ` Simon Horman
2023-06-22  3:49   ` Arun.Ramadoss
2023-06-20 11:38 ` [PATCH net-next 3/3] net: dsa: microchip: fix writes to phy registers >= 0x10 Rasmus Villemoes
2023-06-20 16:14   ` Simon Horman
2023-06-20 19:28   ` Andrew Lunn
2023-06-21 11:37     ` Rasmus Villemoes
2023-06-23  2:50 ` [PATCH net-next 0/3] " patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230620113855.733526-2-linux@rasmusvillemoes.dk \
    --to=linux@rasmusvillemoes.dk \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=f.fainelli@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=pabeni@redhat.com \
    --cc=woojung.huh@microchip.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox