This is an automated email from the ASF dual-hosted git repository.

xiaoxiang781216 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 09ffa6bd6d874194c6730f8651e490b5b31c8689
Author: raiden00pl <[email protected]>
AuthorDate: Wed Nov 25 22:10:19 2026 +0100

    arch/arm/stm32: Fix the style of the FDCAN v2 SocketCAN driver.
    
    Remove the second WORD_LENGTH definition and the spaces before commas,
    and fix a typo and the interface index range in the comments.
    
    Assisted-by: Claude Code:claude-opus-5-5
    Signed-off-by: raiden00pl <[email protected]>
---
 arch/arm/src/common/stm32/stm32_fdcan_mcan_v2_sock.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/arch/arm/src/common/stm32/stm32_fdcan_mcan_v2_sock.c 
b/arch/arm/src/common/stm32/stm32_fdcan_mcan_v2_sock.c
index 6920a776437..7b2ab1cfa7b 100644
--- a/arch/arm/src/common/stm32/stm32_fdcan_mcan_v2_sock.c
+++ b/arch/arm/src/common/stm32/stm32_fdcan_mcan_v2_sock.c
@@ -105,8 +105,6 @@
 
 /* Message RAM Configuration ************************************************/
 
-#define WORD_LENGTH         4U
-
 /* Define number of Rx / Tx elements in message RAM; note that elements are
  * given sizes in number of words (4-byte chunks)
  *
@@ -347,7 +345,7 @@ static const struct fdcan_config_s stm32_fdcan1_config =
   .mb_irq      =
   {
     STM32_IRQ_FDCAN2_0,
-    STM32_IRQ_FDCAN2_1 ,
+    STM32_IRQ_FDCAN2_1,
   },
 };
 #endif
@@ -360,7 +358,7 @@ static const struct fdcan_config_s stm32_fdcan2_config =
   .mb_irq      =
   {
     STM32_IRQ_FDCAN3_0,
-    STM32_IRQ_FDCAN3_1 ,
+    STM32_IRQ_FDCAN3_1,
   },
 };
 #endif
@@ -372,7 +370,7 @@ static const struct fdcan_config_s stm32_fdcan2_config =
 struct fdcan_driver_s
 {
   const struct fdcan_config_s *config;  /* Pin config */
-  uint8_t iface_idx;                    /* FDCAN interface index (0 or 1) */
+  uint8_t iface_idx;                    /* FDCAN interface index (0 to 2) */
   uint32_t base;                        /* FDCAN base address */
 
   struct fdcan_bitseg arbi_timing;      /* Timing for arbitration phase */
@@ -380,7 +378,7 @@ struct fdcan_driver_s
   struct fdcan_bitseg data_timing;      /* Timing for data phase */
 #endif
 
-  struct fdcan_message_ram message_ram; /* Start addresses for each reagion of 
Message RAM */
+  struct fdcan_message_ram message_ram; /* Start addresses for each region of 
Message RAM */
   struct rx_fifo_s *rx;                 /* Pointer to Rx FIFO0 in Message RAM 
*/
   struct tx_fifo_s *tx;                 /* Pointer to Tx mailboxes in Message 
RAM */
 

Reply via email to