xiaoxiang781216 commented on code in PR #10526:
URL: https://github.com/apache/nuttx/pull/10526#discussion_r1318949247


##########
drivers/video/fb.c:
##########
@@ -217,11 +345,14 @@ static ssize_t fb_read(FAR struct file *filep, FAR char 
*buffer, size_t len)
   /* Get the framebuffer instance */
 
   inode = filep->f_inode;
-  fb    = inode->i_private;
+  fb    = (FAR struct fb_chardev_s *)inode->i_private;
+  priv  = (FAR struct fb_priv_s *)filep->f_priv;

Review Comment:
   ditto



##########
drivers/video/fb.c:
##########
@@ -271,11 +403,14 @@ static ssize_t fb_write(FAR struct file *filep, FAR const 
char *buffer,
   /* Get the framebuffer instance */
 
   inode = filep->f_inode;
-  fb    = inode->i_private;
+  fb    = (FAR struct fb_chardev_s *)inode->i_private;
+  priv  = (FAR struct fb_priv_s *)filep->f_priv;

Review Comment:
   ditto



##########
arch/sim/src/sim/sim_framebuffer.c:
##########
@@ -215,6 +219,19 @@ static int sim_closewindow(struct fb_vtable_s *vtable)
   return ret;
 }
 
+#ifdef CONFIG_FB_SYNC
+static int sim_waitforvsync(struct fb_vtable_s *vtable)

Review Comment:
   let's implement in the fb driver?



##########
drivers/video/fb.c:
##########
@@ -892,69 +1044,121 @@ static int fb_poll(FAR struct file *filep, struct 
pollfd *fds, bool setup)
 {
   FAR struct inode *inode;
   FAR struct fb_chardev_s *fb;
+  FAR struct fb_priv_s *priv;
+  FAR struct circbuf_s *panbuf;
+  FAR struct pollfd **pollfds;
+  irqstate_t flags;
+  int ret = OK;
 
   /* Get the framebuffer instance */
 
   inode = filep->f_inode;
-  fb    = inode->i_private;
+  fb    = (FAR struct fb_chardev_s *)inode->i_private;
+  priv  = (FAR struct fb_priv_s *)filep->f_priv;

Review Comment:
   ditto



##########
drivers/video/fb.c:
##########
@@ -507,14 +646,15 @@ static int fb_ioctl(FAR struct file *filep, int cmd, 
unsigned long arg)
       case FBIO_SELECT_OVERLAY:  /* Select video overlay */
         {
           struct fb_overlayinfo_s oinfo;
+          FAR struct fb_priv_s *priv = (FAR struct fb_priv_s *)filep->f_priv;

Review Comment:
   remove the cast



##########
drivers/video/fb.c:
##########
@@ -851,17 +999,21 @@ static int fb_mmap(FAR struct file *filep, FAR struct 
mm_map_entry_s *map)
 {
   FAR struct inode *inode;
   FAR struct fb_chardev_s *fb;
+  FAR struct fb_priv_s *priv;
   struct fb_panelinfo_s panelinfo;
   int ret;
 
   /* Get the framebuffer instance */
 
   inode = filep->f_inode;
-  fb    = inode->i_private;
+  fb    = (FAR struct fb_chardev_s *)inode->i_private;
+  priv  = (FAR struct fb_priv_s *)filep->f_priv;

Review Comment:
   ditto



##########
drivers/video/fb.c:
##########
@@ -167,12 +291,14 @@ static int fb_close(FAR struct file *filep)
 {
   FAR struct inode *inode;
   FAR struct fb_chardev_s *fb;
+  FAR struct fb_priv_s *priv;
   int ret;
 
   inode = filep->f_inode;
-  fb    = inode->i_private;
+  fb    = (FAR struct fb_chardev_s *)inode->i_private;
+  priv  = (FAR struct fb_priv_s *)filep->f_priv;

Review Comment:
   let's remove both cast



##########
drivers/video/fb.c:
##########
@@ -330,7 +466,10 @@ static off_t fb_seek(FAR struct file *filep, off_t offset, 
int whence)
   /* Get the framebuffer instance */
 
   inode = filep->f_inode;
-  fb    = inode->i_private;
+  fb    = (FAR struct fb_chardev_s *)inode->i_private;
+  priv  = (FAR struct fb_priv_s *)filep->f_priv;

Review Comment:
   ditto



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