You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by bt...@apache.org on 2020/12/29 09:52:22 UTC

[incubator-nuttx] 02/09: fix checkpatch warning

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

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

commit 417d0d4ccd219ee340b021d1f3cc8d3a25815513
Author: Virus.V <vi...@live.com>
AuthorDate: Fri Dec 18 08:38:34 2020 +0800

    fix checkpatch warning
---
 arch/risc-v/src/bl602/bl602_boot2.h             | 1 +
 arch/risc-v/src/bl602/bl602_oneshot_lowerhalf.c | 4 ++++
 arch/risc-v/src/bl602/bl602_tim_lowerhalf.c     | 2 ++
 arch/risc-v/src/bl602/hardware/bl602_timer.h    | 7 +++++--
 arch/risc-v/src/bl602/hardware/bl602_uart.h     | 9 +++++++--
 5 files changed, 19 insertions(+), 4 deletions(-)

diff --git a/arch/risc-v/src/bl602/bl602_boot2.h b/arch/risc-v/src/bl602/bl602_boot2.h
index cc91ae2..4a7ff08 100644
--- a/arch/risc-v/src/bl602/bl602_boot2.h
+++ b/arch/risc-v/src/bl602/bl602_boot2.h
@@ -45,6 +45,7 @@ enum pt_table_error_e
   PT_ERROR_ENTRY_NOT_FOUND,   /* Partition table error type:entry not found */
   PT_ERROR_ENTRY_UPDATE_FAIL, /* Partition table error type:entry update fail
                                */
+
   PT_ERROR_CRC32,       /* Partition table error type:crc32 error */
   PT_ERROR_PARAMETER,   /* Partition table error type:input parameter error */
   PT_ERROR_FALSH_READ,  /* Partition table error type:flash read error */
diff --git a/arch/risc-v/src/bl602/bl602_oneshot_lowerhalf.c b/arch/risc-v/src/bl602/bl602_oneshot_lowerhalf.c
index 2318477..535f59d 100644
--- a/arch/risc-v/src/bl602/bl602_oneshot_lowerhalf.c
+++ b/arch/risc-v/src/bl602/bl602_oneshot_lowerhalf.c
@@ -395,12 +395,16 @@ FAR struct oneshot_lowerhalf_s *oneshot_initialize(int      chan,
   timstr.pl_trig_src =
     TIMER_PRELOAD_TRIG_COMP0; /* Timer count register preload trigger source
                                * slelect */
+
   timstr.count_mode = TIMER_COUNT_PRELOAD; /* Timer count mode */
+
   timstr.clock_division =
     (TIMER_CLK_DIV * resolution) - 1;  /* Timer clock divison value */
+
   timstr.match_val0  = TIMER_MAX_VALUE; /* Timer match 0 value 0 */
   timstr.match_val1  = TIMER_MAX_VALUE; /* Timer match 1 value 0 */
   timstr.match_val2  = TIMER_MAX_VALUE; /* Timer match 2 value 0 */
+
   timstr.pre_load_val = TIMER_MAX_VALUE; /* Timer preload value */
 
   timer_intmask(chan, TIMER_INT_ALL, 1);
diff --git a/arch/risc-v/src/bl602/bl602_tim_lowerhalf.c b/arch/risc-v/src/bl602/bl602_tim_lowerhalf.c
index e0b9da3..ddda6fd 100644
--- a/arch/risc-v/src/bl602/bl602_tim_lowerhalf.c
+++ b/arch/risc-v/src/bl602/bl602_tim_lowerhalf.c
@@ -52,6 +52,7 @@
 struct bl602_lowerhalf_s
 {
   FAR const struct timer_ops_s *ops; /* Lower half operations */
+
   tccb_t    callback; /* Current upper half interrupt callback */
   FAR void *arg;      /* Argument passed to upper half callback */
   bool      started;  /* True: Timer has been started */
@@ -403,6 +404,7 @@ int bl602_timer_initialize(FAR const char *devpath, int timer)
   timstr.pl_trig_src =
     TIMER_PRELOAD_TRIG_COMP0; /* Timer count register preload trigger source
                                  slelect */
+
   timstr.count_mode     = TIMER_COUNT_PRELOAD; /* Timer count mode */
   timstr.clock_division = TIMER_CLK_DIV;       /* Timer clock divison value */
   timstr.match_val0     = TIMER_MAX_VALUE;     /* Timer match 0 value 0 */
diff --git a/arch/risc-v/src/bl602/hardware/bl602_timer.h b/arch/risc-v/src/bl602/hardware/bl602_timer.h
index f717558..97538ba 100644
--- a/arch/risc-v/src/bl602/hardware/bl602_timer.h
+++ b/arch/risc-v/src/bl602/hardware/bl602_timer.h
@@ -599,8 +599,11 @@ struct timer_cfg_s
 {
   timer_chan_t   timer_ch; /* Timer channel */
   timer_clksrc_t clk_src;  /* Timer clock source */
-  timer_preload_trig_t
-                    pl_trig_src; /* Timer count register preload trigger source slelect */
+
+  /* Timer count register preload trigger source slelect */
+
+  timer_preload_trig_t pl_trig_src;
+
   timer_countmode_t count_mode;     /* Timer count mode */
   uint8_t           clock_division; /* Timer clock divison value */
   uint32_t          match_val0;     /* Timer match 0 value 0 */
diff --git a/arch/risc-v/src/bl602/hardware/bl602_uart.h b/arch/risc-v/src/bl602/hardware/bl602_uart.h
index 7166432..786c576 100644
--- a/arch/risc-v/src/bl602/hardware/bl602_uart.h
+++ b/arch/risc-v/src/bl602/hardware/bl602_uart.h
@@ -693,8 +693,13 @@ enum uart_bytebits_inverse_e
 
 enum uart_auto_baudrate_detection_e
 {
-  UART_AUTOBAUD_0X55, /* UART auto baudrate detection using codeword 0x55 */
-  UART_AUTOBAUD_STARTBIT /* UART auto baudrate detection using start bit */
+  /* UART auto baudrate detection using codeword 0x55 */
+
+  UART_AUTOBAUD_0X55,
+
+  /* UART auto baudrate detection using start bit */
+
+  UART_AUTOBAUD_STARTBIT
 };
 
 /* UART interrupt type definition */