xiaoxiang781216 commented on a change in pull request #5179: URL: https://github.com/apache/incubator-nuttx/pull/5179#discussion_r779989451
########## File path: drivers/spi/spi_flash.c ########## @@ -642,15 +635,15 @@ static void spiflash_sectorerase(FAR struct sim_spiflashdev_s *priv) if (priv->wren) { address = priv->address; - if (priv->last_cmd == SPIFLASH_SE) + if (priv->last_cmd == SPI_FLASH_SE) { - address &= CONFIG_SIM_SPIFLASH_SECTORSIZE_MASK; - len = CONFIG_SIM_SPIFLASH_SECTORSIZE; + address &= CONFIG_SPI_FLASH_SECTORSIZE_MASK; + len = CONFIG_SPI_FLASH_SECTORSIZE; } - else if (priv->last_cmd == SPIFLASH_SSE) + else if (priv->last_cmd == SPI_FLASH_SSE) { - address &= CONFIG_SIM_SPIFLASH_SUBSECTORSIZE_MASK; - len = CONFIG_SIM_SPIFLASH_SUBSECTORSIZE; + address &= CONFIG_SPI_FLASH_SUBSECTORSIZE_MASK; + len = CONFIG_SPI_FLASH_SUBSECTORSIZE; } Review comment: Done, but I skip the check before memset since memset will take care this special case. -- 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