jlaitine commented on code in PR #8026:
URL: https://github.com/apache/nuttx/pull/8026#discussion_r1064464826


##########
fs/mmap/fs_mmap.c:
##########
@@ -140,20 +145,6 @@ static int file_mmap_(FAR struct file *filep, FAR void 
*start,
 
   if (filep->f_inode && filep->f_inode->u.i_ops->mmap != NULL)
     {
-      /* Pass the information about the mapping in mm_map_entry_s structure.
-       * The driver may alter the structure, and if it supports unmap, it
-       * will also add it to the kernel maintained list of mappings.
-       */
-
-      struct mm_map_entry_s map =
-        {
-         NULL, /* sq_entry_t */
-         start, length, offset,
-         prot, flags,
-         NULL, /* priv */
-         NULL  /* munmap */
-        };
-
       ret = filep->f_inode->u.i_ops->mmap(filep, &map);

Review Comment:
   Normally yes. 
   
   There are a couple of drivers now which only work in FLAT mode,so they don't 
need to unmap, and mmap doesn't allocate anything (only return a pointer to 
frame buffer or such), so also no need to cleanup anything. So for those, there 
is currently no need to call munmap, and also no need to register the mapping.
   



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