From patchwork Sun Jul 6 17:34:09 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rickard Strandqvist X-Patchwork-Id: 4490141 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 032C89F26C for ; Sun, 6 Jul 2014 17:32:58 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 41D0720265 for ; Sun, 6 Jul 2014 17:32:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2F70D2024D for ; Sun, 6 Jul 2014 17:32:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751798AbaGFRcz (ORCPT ); Sun, 6 Jul 2014 13:32:55 -0400 Received: from mail-wi0-f176.google.com ([209.85.212.176]:41117 "EHLO mail-wi0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751795AbaGFRcy (ORCPT ); Sun, 6 Jul 2014 13:32:54 -0400 Received: by mail-wi0-f176.google.com with SMTP id n3so14813814wiv.3 for ; Sun, 06 Jul 2014 10:32:53 -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=GAJvmaiGUjwq2DrTXxeC7oCUAB9SUjXcbYKr082PVu8=; b=ET0TxNUHh46LfTvMN85af66YoWOb02HPU2v6rLBEZQolUfRpLIy9Cdi9BmOiXpxoO4 DTt7SE7OAHTcWSc8goPCqMt+YxDXqYTsYLOkKqL8XgEJHK/AjGU1YIFvmMNSxPsDj0Ie 7VVVLiDb84JLmzQNCHjreEMDzsxCG0vazDVBVmhlngLYY7A5989n3u1TJhqVooRKhG0T BWV9YGgREPeW5tItljAVitBtoChXXEah+6TYBo9ZVRAPWJLUBhm2YTDy2e4Y0hP52DV2 seyKYYh4ZD4ecqKg8SeZQQAx+U8kBif2vQnzxb1wWW0q+nKmjRIZ3g5PwDmVEy6+mkYP zUJA== X-Gm-Message-State: ALoCoQkrQSLm4ljHj7sRu1Nl4RotIzhUNT56gD59zU4XTqtVONJy7VxrruiCQiWpCYLjuOpLDocg X-Received: by 10.180.198.116 with SMTP id jb20mr30812803wic.59.1404667973472; Sun, 06 Jul 2014 10:32:53 -0700 (PDT) Received: from localhost.localdomain (h-245-62.a218.priv.bahnhof.se. [85.24.245.62]) by mx.google.com with ESMTPSA id sa4sm52211434wjb.45.2014.07.06.10.32.51 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 06 Jul 2014 10:32:52 -0700 (PDT) From: Rickard Strandqvist To: Jean-Christophe Plagniol-Villard , Tomi Valkeinen Cc: Rickard Strandqvist , Jingoo Han , Daniel Vetter , Laurent Pinchart , 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: Sun, 6 Jul 2014 19:34:09 +0200 Message-Id: <1404668049-15016-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=-7.6 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 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