You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/09/09 09:21:42 UTC
[GitHub] [incubator-nuttx] pkarashchenko commented on a diff in pull request #7046: mtd/config: Remove MTD_CONFIG_ERASEDVALUE
pkarashchenko commented on code in PR #7046:
URL: https://github.com/apache/incubator-nuttx/pull/7046#discussion_r966825698
##########
drivers/mtd/mtd_config.c:
##########
@@ -57,15 +57,13 @@
#ifdef CONFIG_MTD_CONFIG_NAMED
# define CONFIGDATA_FORMAT_VERSION 1
+# define MTD_ERASED_ID(dev) (dev->erasestate)
#else
# define CONFIGDATA_FORMAT_VERSION 2
+# define MTD_ERASED_ID(dev) ((dev->erasestate << 8) | dev->erasestate)
Review Comment:
```suggestion
# define MTD_ERASED_ID(dev) (((uint16_t)dev->erasestate << 8) | dev->erasestate)
```
--
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-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org