Thread (3 messages) 3 messages, 2 authors, 2015-06-11

Re: video, sm501: add OF binding to support SM501

From: Dan Carpenter <hidden>
Date: 2015-06-11 09:32:45

On Thu, Jun 11, 2015 at 11:24:41AM +0200, Heiko Schocher wrote:
quoted hunk ↗ jump to hunk
 static struct fb_videomode sm501_default_mode = {
@@ -1963,6 +1965,11 @@ static int sm501fb_probe(struct platform_device *pdev)
                                if (info->edid_data)
                                        found = 1;
                        }
+               } else {
+                       if (fb_mode_cmdline)
+                               strcpy(fb_mode, fb_mode_cmdline);
Could you make this a strncpy()?  These days strlcpy() is
unfashionable...  It's sort of pedantic and it goes over the 80 char
limit but the my static checker will complain if we don't.

				strncpy(fb_mod, fb_mode_cmdline,
					sizeof(fb_mod) - 1);
+                       else
+                               strcpy(fb_mode, fb_default_mode);
regards,
dan carpenter
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help