acassis commented on code in PR #16992:
URL: https://github.com/apache/nuttx/pull/16992#discussion_r2334795408


##########
drivers/mtd/mtd_config_fs.c:
##########
@@ -1989,6 +1992,34 @@ static int nvs_next(FAR struct nvs_fs *fs,
   return OK;
 }
 
+/****************************************************************************
+ * Name: mtdconfig_notify
+ ****************************************************************************/
+
+static void mtdconfig_notify(FAR struct nvs_fs *fs, pollevent_t eventset)
+{
+  /* Is there any waiter? Yes, and notify them directly. */
+
+  if (fs->fds)
+    {
+      poll_notify(&fs->fds, 1, eventset | fs->events);
+      fs->events = 0;
+    }
+
+  /* No, events are saved for the following scenarios.
+   *
+   * a. Events that have changed but not been waited for before being
+   *    added to the interest list.
+   * b. Events that occur after `epoll_wait()` returns and before it is
+   *    called again.
+   */

Review Comment:
   I think separating if () / else () with the comments is not a good idea, 
please keep that part together with previous comment. @xiaoxiang781216 
@jerpelea @linguini1 what do you think?
   
   @JianyuWang0623 sorry for asking these things, but I think it is better to 
keep the code more uniform.



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

Reply via email to