From: Marc Kleine-Budde <mkl@pengutronix.de>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, kuba@kernel.org, linux-can@vger.kernel.org,
kernel@pengutronix.de,
Geert Uytterhoeven <geert+renesas@glider.be>,
Marc Kleine-Budde <mkl@pengutronix.de>
Subject: [PATCH net-next 5/6] can: rcar_can: Convert to FIELD_MODIFY()
Date: Wed, 1 Apr 2026 09:30:13 +0200 [thread overview]
Message-ID: <20260401073338.5592-6-mkl@pengutronix.de> (raw)
In-Reply-To: <20260401073338.5592-1-mkl@pengutronix.de>
From: Geert Uytterhoeven <geert+renesas@glider.be>
Use the FIELD_MODIFY() helper instead of open-coding the same operation.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/ee2e6aaacd5e061c972716ecaf8a929be7ef5f2e.1772705647.git.geert+renesas@glider.be
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
drivers/net/can/rcar/rcar_can.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/can/rcar/rcar_can.c b/drivers/net/can/rcar/rcar_can.c
index fc3df328e877..2727c5ce029c 100644
--- a/drivers/net/can/rcar/rcar_can.c
+++ b/drivers/net/can/rcar/rcar_can.c
@@ -496,8 +496,7 @@ static void rcar_can_start(struct net_device *ndev)
priv->can.state = CAN_STATE_ERROR_ACTIVE;
/* Go to operation mode */
- ctlr &= ~RCAR_CAN_CTLR_CANM;
- ctlr |= FIELD_PREP(RCAR_CAN_CTLR_CANM, RCAR_CAN_CTLR_CANM_OPER);
+ FIELD_MODIFY(RCAR_CAN_CTLR_CANM, &ctlr, RCAR_CAN_CTLR_CANM_OPER);
writew(ctlr, &priv->regs->ctlr);
for (i = 0; i < MAX_STR_READS; i++) {
if (!(readw(&priv->regs->str) & RCAR_CAN_STR_RSTST))
--
2.53.0
next prev parent reply other threads:[~2026-04-01 7:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-01 7:30 [PATCH net-next 0/6] pull-request: can-next 2026-04-01 Marc Kleine-Budde
2026-04-01 7:30 ` [PATCH net-next 1/6] dt-bindings: can: mcp251xfd: add microchip,xstbyen property Marc Kleine-Budde
2026-04-02 2:30 ` patchwork-bot+netdevbpf
2026-04-01 7:30 ` [PATCH net-next 2/6] net: can: ctucanfd: remove useless copy of PCI_DEVICE_DATA macro Marc Kleine-Budde
2026-04-01 7:30 ` [PATCH net-next 3/6] can: kvaser_usb: leaf: refactor endpoint lookup Marc Kleine-Budde
2026-04-01 7:30 ` [PATCH net-next 4/6] can: mcp251xfd: add support for XSTBYEN transceiver standby control Marc Kleine-Budde
2026-04-01 7:30 ` Marc Kleine-Budde [this message]
2026-04-01 7:30 ` [PATCH net-next 6/6] can: ucan: refactor endpoint lookup Marc Kleine-Budde
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=20260401073338.5592-6-mkl@pengutronix.de \
--to=mkl@pengutronix.de \
--cc=davem@davemloft.net \
--cc=geert+renesas@glider.be \
--cc=kernel@pengutronix.de \
--cc=kuba@kernel.org \
--cc=linux-can@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/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