Re: omapfb-main.c: check result of simple_strtoul

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2012-05-10 at 18:51 +0800, Hein Tibosch wrote:
> On 5/10/2012 4:23 PM, Tomi Valkeinen wrote:
> > On Wed, 2012-05-09 at 22:47 +0800, Hein Tibosch wrote:
> >>   		fbnum = simple_strtoul(p, &p, 10);
> >> -		if (p == param)
> >> +		if (p == start)
> >>
> >> correct?
> > Yes, looks like a correct fix. I'll cook up a patch.
> >
> > How did you encounter the bug? What was the outcome?
> I was reading the source, adding some printk's to get more debugging.
> 
> It would fail to detect a syntax error like:
> 
>      "omapfb.vram=0:2M,:5M"
> 

Ok, thanks.

> If I may ask: why aren't "mode" and "modes" filled in:
> 
>     /sys/devices/platform/omapfb/graphics/fb0 ?
> 
> Only "modes" will get an entry when a new mode becomes active.

No particular reason, nobody just has implemented it.

> I thought of adding something like this in hdmi.c:
> 
> +static void omap_to_fbmode (struct fb_videomode *fb_mode, const struct hdmi_config *cfg)
> +{

You can't add framebuffer code to omapdss. omapdss is the lowlevel
driver that cannot depend on the fb driver. omapdss is also used by
other display drivers like omapdrm.

 Tomi

Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux