juniskane edited a comment on issue #24: Fix wait loop and void cast
URL: https://github.com/apache/incubator-nuttx/pull/24#issuecomment-572471623
 
 
   This is unrelated, but why is priv->tx_result ignored here (different than 
priv->rx_result handling)?
   
   ```
   @@ -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
   ```

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

Reply via email to