Linux Framebuffer Layer development
 help / color / mirror / Atom feed
* [PATCH] video: fbdev: omap: omapfb_main.c:  Cleaning up wrong type in format string
@ 2014-07-05 13:22 Rickard Strandqvist
  2014-07-05 16:24 ` [PATCH] video: fbdev: omap: omapfb_main.c: Cleaning up removal variable thet is never used Rickard Strandqvist
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Rickard Strandqvist @ 2014-07-05 13:22 UTC (permalink / raw)
  To: Jean-Christophe Plagniol-Villard, Tomi Valkeinen
  Cc: Rickard Strandqvist, Rickard Strandqvist, Jingoo Han,
	Daniel Vetter, Laurent Pinchart, Rob Clark, Arnd Bergmann,
	linux-fbdev, linux-kernel

From: Rickard Strandqvist <rickard.strandqvist@sonymobile.com>

Wrong type in sscanf format string, requires 'int *' but the
argument type is 'unsigned int *'

This was found using a static code analysis program called cppcheck

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
---
 drivers/video/fbdev/omap/omapfb_main.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/video/fbdev/omap/omapfb_main.c b/drivers/video/fbdev/omap/omapfb_main.c
index d8d028d..7df0764 100644
--- a/drivers/video/fbdev/omap/omapfb_main.c
+++ b/drivers/video/fbdev/omap/omapfb_main.c
@@ -1371,7 +1371,7 @@ static ssize_t omapfb_store_bklight_level(struct device *dev,
 	if (fbdev->panel->set_bklight_level) {
 		unsigned int level;
 
-		if (sscanf(buf, "%10d", &level) = 1) {
+		if (sscanf(buf, "%10u", &level) = 1) {
 			r = fbdev->panel->set_bklight_level(fbdev->panel,
 							    level);
 		} else
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-07-06 18:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-05 13:22 [PATCH] video: fbdev: omap: omapfb_main.c: Cleaning up wrong type in format string Rickard Strandqvist
2014-07-05 16:24 ` [PATCH] video: fbdev: omap: omapfb_main.c: Cleaning up removal variable thet is never used Rickard Strandqvist
2014-07-06 17:34 ` [PATCH] video: fbdev: omap: omapfb_main.c: Cleaning up wrong type in format string Rickard Strandqvist
2014-07-06 18:01   ` Joe Perches
2014-07-06 17:57 ` [PATCH] video: fbdev: omap: omapfb_main.c: Cleaning up removal variable thet is never used Rickard Strandqvist

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox