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

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

commit ea1b49119ae928ac455c753a7e51d4f88fe8022d
Author: Gustavo Henrique Nihei <[email protected]>
AuthorDate: Thu Feb 24 15:57:24 2022 -0300

    xtensa/esp32s3: Apply minor fixes to documentation and code style
    
    Signed-off-by: Gustavo Henrique Nihei <[email protected]>
---
 arch/xtensa/src/esp32s3/esp32s3_wdt.c           | 5 ++---
 arch/xtensa/src/esp32s3/esp32s3_wdt_lowerhalf.c | 8 ++++----
 2 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/arch/xtensa/src/esp32s3/esp32s3_wdt.c 
b/arch/xtensa/src/esp32s3/esp32s3_wdt.c
index 43036bc..8e0103a 100644
--- a/arch/xtensa/src/esp32s3/esp32s3_wdt.c
+++ b/arch/xtensa/src/esp32s3/esp32s3_wdt.c
@@ -842,8 +842,8 @@ struct esp32s3_wdt_dev_s *esp32s3_wdt_init(enum 
esp32s3_wdt_inst_e wdt_id)
       wdt->inuse = true;
     }
 
-  errout:
-    return (struct esp32s3_wdt_dev_s *)wdt;
+errout:
+  return (struct esp32s3_wdt_dev_s *)wdt;
 }
 
 /****************************************************************************
@@ -882,7 +882,6 @@ void esp32s3_wdt_deinit(struct esp32s3_wdt_dev_s *dev)
   DEBUGASSERT(dev != NULL);
 
   wdt = (struct esp32s3_wdt_priv_s *)dev;
-
   wdt->inuse = false;
 }
 
diff --git a/arch/xtensa/src/esp32s3/esp32s3_wdt_lowerhalf.c 
b/arch/xtensa/src/esp32s3/esp32s3_wdt_lowerhalf.c
index be27a8a..259a048 100644
--- a/arch/xtensa/src/esp32s3/esp32s3_wdt_lowerhalf.c
+++ b/arch/xtensa/src/esp32s3/esp32s3_wdt_lowerhalf.c
@@ -86,7 +86,7 @@ enum wdt_peripheral_e
 
 struct esp32s3_wdt_lowerhalf_s
 {
-  const struct watchdog_ops_s *ops;        /* Lower half operations */
+  const struct watchdog_ops_s *ops;        /* Lower-half operations */
   struct esp32s3_wdt_dev_s *wdt;           /* ESP32-S3 watchdog driver */
   uint32_t timeout;                        /* The current timeout */
   enum wdt_peripheral_e peripheral;        /* Indicates if it is from RTC or 
Timer Module */
@@ -104,7 +104,7 @@ struct esp32s3_wdt_lowerhalf_s
 
 static int    wdt_handler(int irq, void *context, void *arg);
 
-/* "Lower half" driver methods **********************************************/
+/* "Lower-half" driver methods **********************************************/
 
 static int    wdt_lh_start(struct watchdog_lowerhalf_s *lower);
 static int    wdt_lh_stop(struct watchdog_lowerhalf_s *lower);
@@ -120,7 +120,7 @@ static xcpt_t wdt_lh_capture(struct watchdog_lowerhalf_s 
*lower,
  * Private Data
  ****************************************************************************/
 
-/* "Lower half" driver methods */
+/* "Lower-half" driver methods */
 
 static const struct watchdog_ops_s g_esp32s3_wdg_ops =
 {
@@ -551,7 +551,7 @@ static xcpt_t wdt_lh_capture(struct watchdog_lowerhalf_s 
*lower,
    * change the callback function once a callback has already been settled.
    */
 
-  if (priv->handler != NULL && priv->started == true)
+  if (priv->handler != NULL && priv->started)
     {
       /* Deallocate the previous allocated interrupt
        * If there is a previous allocated interrupt.

Reply via email to