From patchwork Sat Jul 5 13:22:31 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rickard Strandqvist X-Patchwork-Id: 4488471 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 8B6929F26C for ; Sat, 5 Jul 2014 13:21:20 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9C0FC202BE for ; Sat, 5 Jul 2014 13:21:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7FDE0201C0 for ; Sat, 5 Jul 2014 13:21:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754840AbaGENVR (ORCPT ); Sat, 5 Jul 2014 09:21:17 -0400 Received: from mail-lb0-f178.google.com ([209.85.217.178]:60521 "EHLO mail-lb0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752961AbaGENVR (ORCPT ); Sat, 5 Jul 2014 09:21:17 -0400 Received: by mail-lb0-f178.google.com with SMTP id 10so1760340lbg.9 for ; Sat, 05 Jul 2014 06:21:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=GBYKiXs++MTVWwEYcnYSDwa30lGd1VciUsIHnZB2Xho=; b=JWHMFoUfWBxPK3zuBAyWC2eASwZtLWT1w6Zhm7r273ZpZwgyX/biPv+19tplON+b5g FhJrsLneJF6fuEu/acmclrKzhHJBvOCg/RvYjPH/tVOLU+spW57BaLnur9t0YB3EZf3u nUsU2DxyfoaxNw5rI0dtEOQyuGDJzQxuw54g02+YBDrGC3pKFhIDYqr+rf87903ZsVEA SuuGg22gf3ppVPCLwRL2TbM5ZyMXAW1nx3LdjC3iPOZT2sdTtfKp8E0LVz8HwvJyzpwZ MFRxED/SMiX5FQ+y/EmZpRXy+ooZmKBN3Nono7ORGJCKeWEJXtWa/v9ZQTdBTedkuLHz cLhw== X-Gm-Message-State: ALoCoQn/JM3J2KHNAtniacd7W9AhVq1Mkr/zQIDawD9cpjBzWTiPTrtFQBjBSb2s9+yBv17TlQvN X-Received: by 10.112.170.10 with SMTP id ai10mr29822lbc.93.1404566475728; Sat, 05 Jul 2014 06:21:15 -0700 (PDT) Received: from localhost.localdomain (h-245-62.a218.priv.bahnhof.se. [85.24.245.62]) by mx.google.com with ESMTPSA id tg1sm17339528lbb.11.2014.07.05.06.21.13 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 05 Jul 2014 06:21:14 -0700 (PDT) From: Rickard Strandqvist To: Jean-Christophe Plagniol-Villard , Tomi Valkeinen Cc: Rickard Strandqvist , Rickard Strandqvist , Jingoo Han , Daniel Vetter , Laurent Pinchart , Rob Clark , Arnd Bergmann , linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] video: fbdev: omap: omapfb_main.c: Cleaning up wrong type in format string Date: Sat, 5 Jul 2014 15:22:31 +0200 Message-Id: <1404566552-23096-1-git-send-email-rickard_strandqvist@spectrumdigital.se> X-Mailer: git-send-email 1.7.10.4 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Rickard Strandqvist 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 --- 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