pkarashchenko commented on code in PR #6965:
URL: https://github.com/apache/incubator-nuttx/pull/6965#discussion_r996470424


##########
drivers/lcd/ht16k33_14seg.c:
##########
@@ -107,7 +108,7 @@ struct ht16k33_dev_s
   uint8_t    col;               /* Current col position to write on display  */
   uint8_t    buffer[HT16K33_MAX_COL];
   bool       pendscroll;
-  sem_t sem_excl;
+  mutex_t lock;

Review Comment:
   optional
   ```suggestion
     mutex_t    lock;
   ```



##########
drivers/lcd/st7032.c:
##########
@@ -67,7 +68,7 @@ struct st7032_dev_s
   uint8_t    col;               /* Current col position to write on display  */
   uint8_t    buffer[ST7032_MAX_ROW * ST7032_MAX_COL];
   bool       pendscroll;
-  sem_t sem_excl;
+  mutex_t lock;

Review Comment:
   Optional



##########
drivers/input/stmpe811_base.c:
##########
@@ -302,6 +302,7 @@ STMPE811_HANDLE stmpe811_instantiate(FAR struct 
i2c_master_s *dev,
   ret = stmpe811_checkid(priv);
   if (ret < 0)
     {
+      nxmutex_destroy(&priv->lock);

Review Comment:
   should be
   ```
   #ifdef CONFIG_STMPE811_MULTIPLE
       g_stmpe811list = priv->flink;
   #endif
       nxmutex_destroy(&priv->lock);
       kmm_free(priv);
   ```



##########
drivers/sensors/lsm330_spi.c:
##########
@@ -1397,7 +1393,7 @@ int lsm330_register(FAR const char *devpath_acl,
     {
       snerr("ERROR: Failed to register gyroscope driver: %d\n", ret);
 
-      nxsem_destroy(&priv->datasem);
+      nxmutex_destroy(&priv->devicelock);
       kmm_free(priv);

Review Comment:
   yeah. missed `priv` vs `priva` :)



##########
drivers/syslog/ramlog.c:
##########
@@ -805,6 +806,10 @@ int ramlog_register(FAR const char *devpath, FAR char 
*buffer, size_t buflen)
       ret = register_driver(devpath, &g_ramlogfops, 0666, priv);
       if (ret < 0)
         {
+          nxmutex_destroy(&priv->rl_lock);
+#ifndef CONFIG_RAMLOG_NONBLOCKING
+          nxsem_destroy(&priv->rl_waitsem, 0, 0);

Review Comment:
   ```suggestion
             nxsem_destroy(&priv->rl_waitsem);
   ```



##########
wireless/pktradio/pktradio_metadata.c:
##########
@@ -49,7 +49,7 @@ static FAR struct pktradio_metadata_s *g_free_metadata;
 
 /* Supports mutually exclusive access to the free list */
 
-static sem_t g_metadata_sem;
+static mutex_t g_metadata_lock;

Review Comment:
   Sorry. I missed the call of `nxmutex_init(&g_metadata_lock);` and posted 
this comment. Now reviewed again and all is in place



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to