xiaoxiang781216 commented on issue #24: Fix wait loop and void cast URL: https://github.com/apache/incubator-nuttx/pull/24#issuecomment-573091853 > > > ``` > > > @@ -645,23 +637,7 @@ static void spi_dmarxwait(FAR struct stm32l4_spidev_s *priv) > > > #ifdef CONFIG_STM32L4_SPI_DMA > > > static void spi_dmatxwait(FAR struct stm32l4_spidev_s *priv) > > > { > > > - int ret; > > > - > > > - /* Take the semaphore (perhaps waiting). If the result is zero, then the DMA > > > - * must not really have completed??? > > > - */ > > > - > > > - do > > > - { > > > - ret = nxsem_wait(&priv->txsem); > > > - > > > - /* The only case that an error should occur here is if the wait was > > > - * awakened by a signal. > > > - */ > > > - > > > - DEBUGASSERT(ret == OK || ret == -EINTR); > > > - } > > > - while (ret == -EINTR || priv->txresult == 0); > > > + nxsem_wait_uninterruptible(&priv->txsem); > > > } > > > #endif > > > ``` > > > > > > My intention is to remove all result check since only interrupt handler will post semaphore, the check is redundant. > > Any reason why this bit of code is now done differently for stm32f7 and stm32f0l0g0 than for other STM32? I will provide a patch to bring back "do {} while (priv->XXresult == 0);".
---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
