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, Marc Kleine-Budde <mkl@pengutronix.de>
Subject: [PATCH v2 02/27] can: at91_can: use a consistent indention
Date: Thu, 05 Oct 2023 09:49:30 +0200	[thread overview]
Message-ID: <20231005-at91_can-rx_offload-v2-2-9987d53600e0@pengutronix.de> (raw)
In-Reply-To: <20231005-at91_can-rx_offload-v2-0-9987d53600e0@pengutronix.de>

Convert the driver to use a consistent indention of one space after
defines and in enums. That makes it easier to add new defines, which
will be done in the coming patches.

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

diff --git a/drivers/net/can/at91_can.c b/drivers/net/can/at91_can.c
index 4621266851ed..367ccf109652 100644
--- a/drivers/net/can/at91_can.c
+++ b/drivers/net/can/at91_can.c
@@ -25,89 +25,89 @@
 #include <linux/can/dev.h>
 #include <linux/can/error.h>
 
-#define AT91_MB_MASK(i)		((1 << (i)) - 1)
+#define AT91_MB_MASK(i) ((1 << (i)) - 1)
 
 /* Common registers */
 enum at91_reg {
-	AT91_MR		= 0x000,
-	AT91_IER	= 0x004,
-	AT91_IDR	= 0x008,
-	AT91_IMR	= 0x00C,
-	AT91_SR		= 0x010,
-	AT91_BR		= 0x014,
-	AT91_TIM	= 0x018,
-	AT91_TIMESTP	= 0x01C,
-	AT91_ECR	= 0x020,
-	AT91_TCR	= 0x024,
-	AT91_ACR	= 0x028,
+	AT91_MR = 0x000,
+	AT91_IER = 0x004,
+	AT91_IDR = 0x008,
+	AT91_IMR = 0x00C,
+	AT91_SR = 0x010,
+	AT91_BR = 0x014,
+	AT91_TIM = 0x018,
+	AT91_TIMESTP = 0x01C,
+	AT91_ECR = 0x020,
+	AT91_TCR = 0x024,
+	AT91_ACR = 0x028,
 };
 
 /* Mailbox registers (0 <= i <= 15) */
-#define AT91_MMR(i)		((enum at91_reg)(0x200 + ((i) * 0x20)))
-#define AT91_MAM(i)		((enum at91_reg)(0x204 + ((i) * 0x20)))
-#define AT91_MID(i)		((enum at91_reg)(0x208 + ((i) * 0x20)))
-#define AT91_MFID(i)		((enum at91_reg)(0x20C + ((i) * 0x20)))
-#define AT91_MSR(i)		((enum at91_reg)(0x210 + ((i) * 0x20)))
-#define AT91_MDL(i)		((enum at91_reg)(0x214 + ((i) * 0x20)))
-#define AT91_MDH(i)		((enum at91_reg)(0x218 + ((i) * 0x20)))
-#define AT91_MCR(i)		((enum at91_reg)(0x21C + ((i) * 0x20)))
+#define AT91_MMR(i) ((enum at91_reg)(0x200 + ((i) * 0x20)))
+#define AT91_MAM(i) ((enum at91_reg)(0x204 + ((i) * 0x20)))
+#define AT91_MID(i) ((enum at91_reg)(0x208 + ((i) * 0x20)))
+#define AT91_MFID(i) ((enum at91_reg)(0x20C + ((i) * 0x20)))
+#define AT91_MSR(i) ((enum at91_reg)(0x210 + ((i) * 0x20)))
+#define AT91_MDL(i) ((enum at91_reg)(0x214 + ((i) * 0x20)))
+#define AT91_MDH(i) ((enum at91_reg)(0x218 + ((i) * 0x20)))
+#define AT91_MCR(i) ((enum at91_reg)(0x21C + ((i) * 0x20)))
 
 /* Register bits */
-#define AT91_MR_CANEN		BIT(0)
-#define AT91_MR_LPM		BIT(1)
-#define AT91_MR_ABM		BIT(2)
-#define AT91_MR_OVL		BIT(3)
-#define AT91_MR_TEOF		BIT(4)
-#define AT91_MR_TTM		BIT(5)
-#define AT91_MR_TIMFRZ		BIT(6)
-#define AT91_MR_DRPT		BIT(7)
+#define AT91_MR_CANEN BIT(0)
+#define AT91_MR_LPM BIT(1)
+#define AT91_MR_ABM BIT(2)
+#define AT91_MR_OVL BIT(3)
+#define AT91_MR_TEOF BIT(4)
+#define AT91_MR_TTM BIT(5)
+#define AT91_MR_TIMFRZ BIT(6)
+#define AT91_MR_DRPT BIT(7)
 
-#define AT91_SR_RBSY		BIT(29)
+#define AT91_SR_RBSY BIT(29)
 
-#define AT91_MMR_PRIO_SHIFT	(16)
+#define AT91_MMR_PRIO_SHIFT (16)
 
-#define AT91_MID_MIDE		BIT(29)
+#define AT91_MID_MIDE BIT(29)
 
-#define AT91_MSR_MRTR		BIT(20)
-#define AT91_MSR_MABT		BIT(22)
-#define AT91_MSR_MRDY		BIT(23)
-#define AT91_MSR_MMI		BIT(24)
+#define AT91_MSR_MRTR BIT(20)
+#define AT91_MSR_MABT BIT(22)
+#define AT91_MSR_MRDY BIT(23)
+#define AT91_MSR_MMI BIT(24)
 
-#define AT91_MCR_MRTR		BIT(20)
-#define AT91_MCR_MTCR		BIT(23)
+#define AT91_MCR_MRTR BIT(20)
+#define AT91_MCR_MTCR BIT(23)
 
 /* Mailbox Modes */
 enum at91_mb_mode {
-	AT91_MB_MODE_DISABLED	= 0,
-	AT91_MB_MODE_RX		= 1,
-	AT91_MB_MODE_RX_OVRWR	= 2,
-	AT91_MB_MODE_TX		= 3,
-	AT91_MB_MODE_CONSUMER	= 4,
-	AT91_MB_MODE_PRODUCER	= 5,
+	AT91_MB_MODE_DISABLED = 0,
+	AT91_MB_MODE_RX = 1,
+	AT91_MB_MODE_RX_OVRWR = 2,
+	AT91_MB_MODE_TX = 3,
+	AT91_MB_MODE_CONSUMER = 4,
+	AT91_MB_MODE_PRODUCER = 5,
 };
 
 /* Interrupt mask bits */
-#define AT91_IRQ_ERRA		BIT(16)
-#define AT91_IRQ_WARN		BIT(17)
-#define AT91_IRQ_ERRP		BIT(18)
-#define AT91_IRQ_BOFF		BIT(19)
-#define AT91_IRQ_SLEEP		BIT(20)
-#define AT91_IRQ_WAKEUP		BIT(21)
-#define AT91_IRQ_TOVF		BIT(22)
-#define AT91_IRQ_TSTP		BIT(23)
-#define AT91_IRQ_CERR		BIT(24)
-#define AT91_IRQ_SERR		BIT(25)
-#define AT91_IRQ_AERR		BIT(26)
-#define AT91_IRQ_FERR		BIT(27)
-#define AT91_IRQ_BERR		BIT(28)
+#define AT91_IRQ_ERRA BIT(16)
+#define AT91_IRQ_WARN BIT(17)
+#define AT91_IRQ_ERRP BIT(18)
+#define AT91_IRQ_BOFF BIT(19)
+#define AT91_IRQ_SLEEP BIT(20)
+#define AT91_IRQ_WAKEUP BIT(21)
+#define AT91_IRQ_TOVF BIT(22)
+#define AT91_IRQ_TSTP BIT(23)
+#define AT91_IRQ_CERR BIT(24)
+#define AT91_IRQ_SERR BIT(25)
+#define AT91_IRQ_AERR BIT(26)
+#define AT91_IRQ_FERR BIT(27)
+#define AT91_IRQ_BERR BIT(28)
 
-#define AT91_IRQ_ERR_ALL	(0x1fff0000)
-#define AT91_IRQ_ERR_FRAME	(AT91_IRQ_CERR | AT91_IRQ_SERR | \
-				 AT91_IRQ_AERR | AT91_IRQ_FERR | AT91_IRQ_BERR)
-#define AT91_IRQ_ERR_LINE	(AT91_IRQ_ERRA | AT91_IRQ_WARN | \
-				 AT91_IRQ_ERRP | AT91_IRQ_BOFF)
+#define AT91_IRQ_ERR_ALL (0x1fff0000)
+#define AT91_IRQ_ERR_FRAME (AT91_IRQ_CERR | AT91_IRQ_SERR | \
+			    AT91_IRQ_AERR | AT91_IRQ_FERR | AT91_IRQ_BERR)
+#define AT91_IRQ_ERR_LINE (AT91_IRQ_ERRA | AT91_IRQ_WARN | \
+			   AT91_IRQ_ERRP | AT91_IRQ_BOFF)
 
-#define AT91_IRQ_ALL		(0x1fffffff)
+#define AT91_IRQ_ALL (0x1fffffff)
 
 enum at91_devtype {
 	AT91_DEVTYPE_SAM9263,

-- 
2.40.1



  parent reply	other threads:[~2023-10-05 16:13 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-05  7:49 [PATCH v2 00/27] can: at91: add can_state_get_by_berr_counter() helper, cleanup and convert to rx_offload Marc Kleine-Budde
2023-10-05  7:49 ` [PATCH v2 01/27] can: dev: add can_state_get_by_berr_counter() to return the CAN state based on the current error counters Marc Kleine-Budde
2023-10-05  7:49 ` Marc Kleine-Budde [this message]
2023-10-05  7:49 ` [PATCH v2 03/27] can: at91_can: at91_irq_tx(): remove one level of indention Marc Kleine-Budde
2023-10-05  7:49 ` [PATCH v2 04/27] can: at91_can: BR register: convert to FIELD_PREP() Marc Kleine-Budde
2023-10-05  7:49 ` [PATCH v2 05/27] can: at91_can: ECR register: convert to FIELD_GET() Marc Kleine-Budde
2023-10-05  7:49 ` [PATCH v2 06/27] can: at91_can: MMR registers: convert to FIELD_PREP() Marc Kleine-Budde
2023-10-05  7:49 ` [PATCH v2 07/27] can: at91_can: MID registers: convert access to FIELD_PREP(), FIELD_GET() Marc Kleine-Budde
2023-10-05  7:49 ` [PATCH v2 08/27] can: at91_can: MSR Register: convert to FIELD_PREP() Marc Kleine-Budde
2023-10-05  7:49 ` [PATCH v2 09/27] can: at91_can: MCR " Marc Kleine-Budde
2023-10-05  7:49 ` [PATCH v2 10/27] can: at91_can: add more register definitions Marc Kleine-Budde
2023-10-05  7:49 ` [PATCH v2 11/27] can: at91_can: at91_setup_mailboxes(): update comments Marc Kleine-Budde
2023-10-05  7:49 ` [PATCH v2 12/27] can: at91_can: rename struct at91_priv::{tx_next,tx_echo} to {tx_head,tx_tail} Marc Kleine-Budde
2023-10-05  7:49 ` [PATCH v2 13/27] can: at91_can: at91_set_bittiming(): demote register output to debug level Marc Kleine-Budde
2023-10-05  7:49 ` [PATCH v2 14/27] can: at91_can: at91_chip_start(): don't disable IRQs twice Marc Kleine-Budde
2023-10-05  7:49 ` [PATCH v2 15/27] can: at91_can: at91_open(): forward request_irq()'s return value in case or an error Marc Kleine-Budde
2023-10-05  7:49 ` [PATCH v2 16/27] can: at91_can: add CAN transceiver support Marc Kleine-Budde
2023-10-05  7:49 ` [PATCH v2 17/27] can: at91_can: at91_poll_err(): fold in at91_poll_err_frame() Marc Kleine-Budde
2023-10-05  7:49 ` [PATCH v2 18/27] can: at91_can: at91_poll_err(): increase stats even if no quota left or OOM Marc Kleine-Budde
2023-10-05  7:49 ` [PATCH v2 19/27] can: at91_can: at91_irq_err_frame(): call directly from IRQ handler Marc Kleine-Budde
2023-10-05  7:49 ` [PATCH v2 20/27] can: at91_can: at91_irq_err_frame(): move next to at91_irq_err() Marc Kleine-Budde
2023-10-05  7:49 ` [PATCH v2 21/27] can: at91_can: at91_irq_err(): rename to at91_irq_err_line() Marc Kleine-Budde
2023-10-05  7:49 ` [PATCH v2 22/27] can: at91_can: at91_irq_err_line(): make use of can_state_get_by_berr_counter() Marc Kleine-Budde
2023-10-05  7:49 ` [PATCH v2 23/27] can: at91_can: at91_irq_err_line(): take reg_sr into account for bus off Marc Kleine-Budde
2023-10-05  7:49 ` [PATCH v2 24/27] can: at91_can: at91_irq_err_line(): make use of can_change_state() and can_bus_off() Marc Kleine-Budde
2023-10-05  7:49 ` [PATCH v2 25/27] can: at91_can: at91_irq_err_line(): send error counters with state change Marc Kleine-Budde
2023-10-05  7:49 ` [PATCH v2 26/27] can: at91_can: at91_alloc_can_err_skb() introduce new function Marc Kleine-Budde
2023-10-05  7:49 ` [PATCH v2 27/27] can: at91_can: switch to rx-offload implementation 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=20231005-at91_can-rx_offload-v2-2-9987d53600e0@pengutronix.de \
    --to=mkl@pengutronix.de \
    --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.