lkml.org 
[lkml]   [2014]   [Jan]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v5] video: add OpenCores VGA/LCD framebuffer driver
On Mon, Jan 13, 2014 at 10:24:49AM +0900, Jingoo Han wrote:
> On Saturday, January 11, 2014 5:13 AM, Stefan Kristiansson wrote:
> > +#include <linux/module.h>
> > +#include <linux/kernel.h>
> > +#include <linux/errno.h>
> > +#include <linux/string.h>
> > +#include <linux/slab.h>
> > +#include <linux/delay.h>
> > +#include <linux/mm.h>
> > +#include <linux/dma-mapping.h>
> > +#include <linux/fb.h>
> > +#include <linux/init.h>
> > +#include <linux/io.h>
> > +#include <linux/platform_device.h>
> > +#include <linux/of.h>
>
> Would you re-order these headers alphabetically?
> It enhances the readability.
>

OK

> [.....]
>
> > +struct ocfb_dev {
> > + struct fb_info info;
> > + void __iomem *regs;
> > + /* flag indicating whether the regs are little endian accessed */
> > + int little_endian;
> > + /* Physical and virtual addresses of framebuffer */
> > + phys_addr_t fb_phys;
> > + void __iomem *fb_virt;
> > + u32 pseudo_palette[PALETTE_SIZE];
> > +};
>
> Here, 'fb_virt' is already defined as 'void __iomem *'.
>
> [.....]
>
> > + fbdev->info.fix.smem_start = fbdev->fb_phys;
> > + fbdev->info.screen_base = (void __iomem *)fbdev->fb_virt;
>
> Please remove unnecessary casting as below, because 'fb_virt' is already
> defined as 'void __iomem *'.
>
> + fbdev->info.screen_base = fbdev->fb_virt;
>
> > + fbdev->info.pseudo_palette = fbdev->pseudo_palette;
> > +
> > + /* Clear framebuffer */
> > + memset_io((void __iomem *)fbdev->fb_virt, 0, fbsize);
>
> Same here.
>
> + memset_io(fbdev->fb_virt, 0, fbsize);
>

Nice catch, will do.

Stefan


\
 
 \ /
  Last update: 2014-01-13 08:01    [W:0.086 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site