xiaoxiang781216 commented on code in PR #8026: URL: https://github.com/apache/nuttx/pull/8026#discussion_r1064470936
########## 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: but the caller who call munmap will report the error now. BTW, the new complex driver may need to clear up the resource in munmap callback. -- 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