hujun260 commented on code in PR #15648: URL: https://github.com/apache/nuttx/pull/15648#discussion_r1926312301
########## arch/arm/src/stm32/stm32_i2c.c: ########## @@ -552,7 +557,8 @@ static inline int stm32_i2c_sem_waitdone(struct stm32_i2c_priv_s *priv) uint32_t regval; int ret; - flags = enter_critical_section(); + flags = spin_lock_irqsave(&priv->spinlock); + sched_lock(); Review Comment: The sched_lock is not required here. and the calls to sched_lock should be paired, and there should be no wait operations in between calls to sched_lock -- 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