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 2021/08/11 15:18:59 UTC
[GitHub] [incubator-nuttx] xiaoxiang781216 opened a new pull request #4325: Remove the duplicated IOCTL between mtd and block
xiaoxiang781216 opened a new pull request #4325:
URL: https://github.com/apache/incubator-nuttx/pull/4325
## Summary
This patchset contain three change:
- mtd: Replace MTDIOC_PARTINFO with BIOC_PARTINFO
- Revert "mtd: Add MTDIOC_FLUSH IOCTL like MTDIOC_XIPBASE"
- mtd: Replace MTDIOC_XIPBASE with BIOC_XIPBASE
All changes try to consolidate the same IOCTL in block layer and mtd layer:
1. Simplify the general driver(e.g. partition, flt) implementation
2. Reduce the confusion with the same IOCTL in the different layer
3. Share the same IOCTL between block and mtd if the concept is same(e.g. XIPBASE, FLUSH and PART).
4. The different concept still expose with the different IOCTL(e.g. geometry, erase...).
## Impact
MTD layer
## Testing
--
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
[GitHub] [incubator-nuttx] gustavonihei commented on a change in pull request #4325: Remove the duplicated IOCTL between mtd and block
Posted by GitBox <gi...@apache.org>.
gustavonihei commented on a change in pull request #4325:
URL: https://github.com/apache/incubator-nuttx/pull/4325#discussion_r687059441
##########
File path: drivers/mtd/ftl.c
##########
@@ -506,31 +506,9 @@ static int ftl_ioctl(FAR struct inode *inode, int cmd, unsigned long arg)
dev = (struct ftl_struct_s *)inode->i_private;
- /* Only one block driver ioctl command is supported by this driver (and
- * that command is just passed on to the MTD driver in a slightly
- * different form).
- */
-
- if (cmd == BIOC_XIPBASE)
- {
- /* The argument accompanying the BIOC_XIPBASE should be non-NULL. If
- * DEBUG is enabled, we will catch it here instead of in the MTD
- * driver.
- */
+ /* Only one block driver ioctl command is supported by this driver */
Review comment:
This comment should be removed, it no longer holds true.
--
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
[GitHub] [incubator-nuttx] acassis merged pull request #4325: Remove the duplicated IOCTL between mtd and block
Posted by GitBox <gi...@apache.org>.
acassis merged pull request #4325:
URL: https://github.com/apache/incubator-nuttx/pull/4325
--
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
[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a change in pull request #4325: Remove the duplicated IOCTL between mtd and block
Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on a change in pull request #4325:
URL: https://github.com/apache/incubator-nuttx/pull/4325#discussion_r687405002
##########
File path: drivers/mtd/ftl.c
##########
@@ -506,31 +506,9 @@ static int ftl_ioctl(FAR struct inode *inode, int cmd, unsigned long arg)
dev = (struct ftl_struct_s *)inode->i_private;
- /* Only one block driver ioctl command is supported by this driver (and
- * that command is just passed on to the MTD driver in a slightly
- * different form).
- */
-
- if (cmd == BIOC_XIPBASE)
- {
- /* The argument accompanying the BIOC_XIPBASE should be non-NULL. If
- * DEBUG is enabled, we will catch it here instead of in the MTD
- * driver.
- */
+ /* Only one block driver ioctl command is supported by this driver */
Review comment:
Done.
--
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
[GitHub] [incubator-nuttx] gustavonihei commented on pull request #4325: Remove the duplicated IOCTL between mtd and block
Posted by GitBox <gi...@apache.org>.
gustavonihei commented on pull request #4325:
URL: https://github.com/apache/incubator-nuttx/pull/4325#issuecomment-897063799
Also, this is a breaking change, so it needs to be added to the Release Notes for the upcoming release.
--
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
[GitHub] [incubator-nuttx] xiaoxiang781216 commented on pull request #4325: Remove the duplicated IOCTL between mtd and block
Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on pull request #4325:
URL: https://github.com/apache/incubator-nuttx/pull/4325#issuecomment-897368795
> Also, this is a breaking change, so it needs to be added to the Release Notes for the upcoming release.
Done, https://cwiki.apache.org/confluence/display/NUTTX/NuttX+10.2.
--
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
[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a change in pull request #4325: Remove the duplicated IOCTL between mtd and block
Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on a change in pull request #4325:
URL: https://github.com/apache/incubator-nuttx/pull/4325#discussion_r687405045
##########
File path: include/nuttx/mtd/mtd.h
##########
@@ -45,11 +45,6 @@
* receive geometry data (see mtd.h)
* OUT: Geometry structure is populated
* with data for the MTD */
-#define MTDIOC_XIPBASE _MTDIOC(0x0002) /* IN: Pointer to pointer to void in
Review comment:
Done.
--
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
[GitHub] [incubator-nuttx] gustavonihei commented on a change in pull request #4325: Remove the duplicated IOCTL between mtd and block
Posted by GitBox <gi...@apache.org>.
gustavonihei commented on a change in pull request #4325:
URL: https://github.com/apache/incubator-nuttx/pull/4325#discussion_r687061112
##########
File path: include/nuttx/mtd/mtd.h
##########
@@ -45,11 +45,6 @@
* receive geometry data (see mtd.h)
* OUT: Geometry structure is populated
* with data for the MTD */
-#define MTDIOC_XIPBASE _MTDIOC(0x0002) /* IN: Pointer to pointer to void in
Review comment:
I believe it is worth adding a note here, similar to this one in Linux:
https://github.com/torvalds/linux/blob/master/include/uapi/mtd/mtd-abi.h#L152-L156
--
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
[GitHub] [incubator-nuttx] gustavonihei commented on a change in pull request #4325: Remove the duplicated IOCTL between mtd and block
Posted by GitBox <gi...@apache.org>.
gustavonihei commented on a change in pull request #4325:
URL: https://github.com/apache/incubator-nuttx/pull/4325#discussion_r687061112
##########
File path: include/nuttx/mtd/mtd.h
##########
@@ -45,11 +45,6 @@
* receive geometry data (see mtd.h)
* OUT: Geometry structure is populated
* with data for the MTD */
-#define MTDIOC_XIPBASE _MTDIOC(0x0002) /* IN: Pointer to pointer to void in
Review comment:
I believe it is worth adding a note here, similar to this one in Linux:
https://elixir.bootlin.com/linux/latest/source/include/uapi/mtd/mtd-abi.h#L152
--
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