jlaitine commented on code in PR #8000: URL: https://github.com/apache/nuttx/pull/8000#discussion_r1059910325
########## drivers/video/fb.c: ########## @@ -682,6 +675,30 @@ static int fb_ioctl(FAR struct file *filep, int cmd, unsigned long arg) return ret; } +static int fb_mmap(FAR struct file *filep, FAR void **addr, off_t start, + size_t length) +{ + FAR struct inode *inode; + FAR struct fb_chardev_s *fb; + int ret = -EINVAL; + + /* Get the framebuffer instance */ + + DEBUGASSERT(filep != NULL && filep->f_inode != NULL); + inode = filep->f_inode; + fb = (FAR struct fb_chardev_s *)inode->i_private; + + /* Return the address corresponding to the start of frame buffer. */ Review Comment: this is the original code: ``` - case FIOC_MMAP: /* Get color plane info */ - { - FAR void **ppv = (FAR void **)((uintptr_t)arg); - - /* Return the address corresponding to the start of frame buffer. */ - - DEBUGASSERT(ppv != NULL); - *ppv = fb->fbmem; - ret = OK; - } - break; ``` There is no such checks -- 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