jingfei195887 commented on code in PR #17845:
URL: https://github.com/apache/nuttx/pull/17845#discussion_r2684995299


##########
drivers/mtd/ftl.c:
##########
@@ -561,6 +562,18 @@ static ssize_t ftl_flush(FAR void *priv, FAR const uint8_t 
*buffer,
   int    nbytes;
   int    ret;
 
+  if (dev->mtd->erase == NULL && dev->lptable == NULL)
+    {
+      ret = MTD_BWRITE(dev->mtd, startblock, nblocks, buffer);
+      if (ret != nblocks)
+        {
+          ferr("ERROR: Direct write block %" PRIdOFF " failed: %d\n",

Review Comment:
   not a problem



##########
drivers/mtd/ftl.c:
##########
@@ -409,9 +410,9 @@ static ssize_t ftl_mtd_erase(FAR struct ftl_struct_s *dev, 
off_t startblock)
         }
 
       ret = MTD_ERASE(dev->mtd, dev->lptable[startblock], 1);
-      if (ret == 1)
+      if (ret >= 0 || ret == -ENOSYS)

Review Comment:
   not a problem



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to