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


##########
drivers/mtd/mtd_config.c:
##########
@@ -1807,7 +1807,7 @@ int mtdconfig_unregister(void)
 
   inode = file.f_inode;
   dev = (FAR struct mtdconfig_struct_s *)inode->i_private;
-  nxmutex_destroy(&dev->exclsem);
+  nxsem_destroy(&dev->exclsem);

Review Comment:
   why here `exclsem` is not replaces with mutex?



##########
arch/arm/src/stm32h7/stm32_flash.c:
##########
@@ -817,19 +790,19 @@ ssize_t up_progmem_eraseblock(size_t block)
   if (stm32h7_wait_for_last_operation(priv))
     {
       ret = -EIO;
-      goto exit_with_lock_sem;
+      goto exit_with_unlok;
     }
 
   stm32h7_flash_modifyreg32(priv, STM32_FLASH_CR1_OFFSET, FLASH_CR_SER, 0);
   stm32h7_flash_modifyreg32(priv, STM32_FLASH_CR1_OFFSET, FLASH_CR_SNB_MASK,
                             0);
   ret = 0;
 
-exit_with_lock_sem:
+exit_with_unlok:

Review Comment:
   ```suggestion
   exit_with_unlock:
   ```



##########
drivers/pipes/pipe.c:
##########
@@ -64,7 +64,7 @@ static const struct file_operations g_pipe_fops =
   pipecommon_poll      /* poll */
 };
 
-static sem_t g_pipesem = SEM_INITIALIZER(1);
+static mutex_t g_pipelock = NXMUTEX_INITIALIZER;
 static int   g_pipeno;

Review Comment:
   ```suggestion
   static int     g_pipeno;
   ```



##########
arch/arm/src/stm32l4/stm32l4_i2c.c:
##########
@@ -3038,43 +2985,35 @@ struct i2c_master_s *stm32l4_i2cbus_initialize(int port)
  *
  ****************************************************************************/
 
-int stm32l4_i2cbus_uninitialize(struct i2c_master_s * dev)
+int stm32l4_i2cbus_uninitialize(struct i2c_master_s *dev)
 {
-  irqstate_t irqs;
-
+  struct stm32l4_i2c_priv_s *priv = ((struct stm32l4_i2c_inst_s *)dev)->priv;

Review Comment:
   Please fix again. Here and all similar places. Move after `DEBUGASSERT(dev);`



-- 
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