[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <1206728329.10785.12.camel@laptop>
Date: Fri, 28 Mar 2008 13:18:49 -0500
From: York Sun <yorksun@...escale.com>
To: avorontsov@...mvista.com
Cc: Scott Wood <scottwood@...escale.com>,
linux-fbdev-devel@...ts.sourceforge.net, a.p.zijlstra@...llo.nl,
linux-kernel@...r.kernel.org, linuxppc-dev@...abs.org,
akpm@...ux-foundation.org, Timur Tabi <timur@...escale.com>
Subject: Re: [PATCH 1/2 v4] Driver for Freescale 8610 and 5121 DIU
On Fri, 2008-03-28 at 20:48 +0300, Anton Vorontsov wrote:
> > >+ if (copy_from_user(&pix_fmt, (void __user *)arg,
> > >+ sizeof(pix_fmt)))
> >
> > OK, you fixed the cast here...
>
> Maybe better would be to define "buf" at the top of this function as
> void __user *buf = (void __user *)arg;, i.e. just once?
I think it is a good idea.
>
> >
> > >+ return -EFAULT;
> > >+ ad->pix_fmt = pix_fmt;
> > >+ pr_debug("Set pixel format to 0x%08x\n", ad->pix_fmt);
> > >+ break;
> > >+ case MFB_GET_PIXFMT:
> > >+ if (!arg)
> > >+ return -EINVAL;
>
> This if (!arg) appears to be everywhere except default: label, maybe
> this could be placed on top too?
Will do that, too.
York
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists