All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: linux-can@vger.kernel.org
Cc: kernel@pengutronix.de, Dario Binacchi <dariobin@libero.it>,
	Marc Kleine-Budde <mkl@pengutronix.de>
Subject: [PATCH v5 05/11] can: c_can: replace double assignments by two single ones
Date: Thu,  4 Mar 2021 16:42:34 +0100	[thread overview]
Message-ID: <20210304154240.2747987-6-mkl@pengutronix.de> (raw)
In-Reply-To: <20210304154240.2747987-1-mkl@pengutronix.de>

This patch replaces the double assignments by two single ones, to make
checkpatch happy.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 drivers/net/can/c_can/c_can.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/can/c_can/c_can.c b/drivers/net/can/c_can/c_can.c
index 9563fa9a4dcf..eb9b1ab09484 100644
--- a/drivers/net/can/c_can/c_can.c
+++ b/drivers/net/can/c_can/c_can.c
@@ -715,7 +715,8 @@ static void c_can_do_tx(struct net_device *dev)
 	struct net_device_stats *stats = &dev->stats;
 	u32 idx, obj, pkts = 0, bytes = 0, pend, clr;
 
-	clr = pend = priv->read_reg(priv, C_CAN_INTPND2_REG);
+	pend = priv->read_reg(priv, C_CAN_INTPND2_REG);
+	clr = pend;
 
 	while ((idx = ffs(pend))) {
 		idx--;
@@ -1041,7 +1042,8 @@ static int c_can_poll(struct napi_struct *napi, int quota)
 
 	/* Only read the status register if a status interrupt was pending */
 	if (atomic_xchg(&priv->sie_pending, 0)) {
-		priv->last_status = curr = priv->read_reg(priv, C_CAN_STS_REG);
+		priv->last_status = priv->read_reg(priv, C_CAN_STS_REG);
+		curr = priv->last_status;
 		/* Ack status on C_CAN. D_CAN is self clearing */
 		if (priv->type != BOSCH_D_CAN)
 			priv->write_reg(priv, C_CAN_STS_REG, LEC_UNUSED);
-- 
2.30.1



  parent reply	other threads:[~2021-03-04 15:44 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-04 15:42 [PATCH v5 0/11] can: c_can: add support to 64 message objects Marc Kleine-Budde
2021-03-04 15:42 ` [PATCH v5 01/11] can: c_can: convert block comments to network style comments Marc Kleine-Budde
2021-03-04 15:42 ` [PATCH v5 02/11] can: c_can: remove unnecessary blank lines and add suggested ones Marc Kleine-Budde
2021-03-04 15:42 ` [PATCH v5 03/11] can: c_can: fix indention Marc Kleine-Budde
2021-03-04 15:42 ` [PATCH v5 04/11] can: c_can: fix print formating string Marc Kleine-Budde
2021-03-04 15:42 ` Marc Kleine-Budde [this message]
2021-03-04 15:42 ` [PATCH v5 06/11] can: c_can: fix remaining checkpatch warnings Marc Kleine-Budde
2021-03-04 15:42 ` [PATCH v5 07/11] can: c_can: remove unused code Marc Kleine-Budde
2021-03-04 15:42 ` [PATCH v5 08/11] can: c_can: c_can_rx_object_get(): fix indentation Marc Kleine-Budde
2021-03-04 15:42 ` [PATCH v5 09/11] can: c_can: c_can_do_tx(): add a comment about IF_RX interface's use Marc Kleine-Budde
2021-03-04 15:42 ` [PATCH v5 10/11] can: c_can: c_can_inval_msg_object(): use 32-bit write to set arbitration register Marc Kleine-Budde
2021-03-04 15:42 ` [PATCH v5 11/11] can: c_can: prepare to up the message objects number Marc Kleine-Budde
2021-03-05 12:26 ` [PATCH v5 0/11] can: c_can: add support to 64 message objects Dario Binacchi
2021-03-05 12:56   ` 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=20210304154240.2747987-6-mkl@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=dariobin@libero.it \
    --cc=kernel@pengutronix.de \
    --cc=linux-can@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.