From patchwork Sat Jul 5 13:17:38 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rickard Strandqvist X-Patchwork-Id: 4488431 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 BFFD69F26C for ; Sat, 5 Jul 2014 13:16:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BF4742021A for ; Sat, 5 Jul 2014 13:16:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 509AB2017E for ; Sat, 5 Jul 2014 13:16:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753438AbaGENQY (ORCPT ); Sat, 5 Jul 2014 09:16:24 -0400 Received: from mail-we0-f180.google.com ([74.125.82.180]:54711 "EHLO mail-we0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751564AbaGENQX (ORCPT ); Sat, 5 Jul 2014 09:16:23 -0400 Received: by mail-we0-f180.google.com with SMTP id x48so2577913wes.39 for ; Sat, 05 Jul 2014 06:16:22 -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=L5gPP+SereGCMgkxytiECCcv86z5w3Y8DACiNaOML58=; b=LNK8RmIZa3cvEWZZ7O8mC8M7HwkVmy2LkRiypV791ATJAhku7M+2Z0G1+GWyCuAT1n xOirp1gUljyPreYIqItD35wVVDlVDhBx0PIxScG8gaEVdxNG1yHcYzMwR6tlaX6VPy+t mL2w8Pu3HKKsiOERwJBmQE/pHiXF4gXAFuBGqv46dmw7ApkNNIqRNY9p4rLbFBoblLUT VeNDKlP/NAIE5PCDa12j/0+gYu2X7qQOYkJL2TTiV1FkoXkhkBTzcYZbVQCaUn2bh9Ni KkmI7cHmGCr9m6GwDVfqPYm6ryIc75bMo0IbtcxpZ/vBrwLDBnvg0HY0KazopaviBA9Q WfIw== X-Gm-Message-State: ALoCoQl+0lICfM7lJwQm2UTWvrq8D+znoV4vLI+86QRdRr0t77Oy/pfkYCqRtSEhUDYnqynxvgPx X-Received: by 10.180.90.132 with SMTP id bw4mr54171501wib.42.1404566182221; Sat, 05 Jul 2014 06:16:22 -0700 (PDT) Received: from localhost.localdomain (h-245-62.a218.priv.bahnhof.se. [85.24.245.62]) by mx.google.com with ESMTPSA id ec8sm72137779wic.10.2014.07.05.06.16.20 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 05 Jul 2014 06:16:21 -0700 (PDT) From: Rickard Strandqvist To: Jean-Christophe Plagniol-Villard , Tomi Valkeinen Cc: Rickard Strandqvist , Rickard Strandqvist , Jingoo Han , Laurent Pinchart , Rob Clark , Daniel Vetter , linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] video: fbdev: omap2: dss: display-sysfs.c: Cleaning up wrong type in format string Date: Sat, 5 Jul 2014 15:17:38 +0200 Message-Id: <1404566258-22901-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 printf format string, requires 'unsigned int' but the argument type is 'int' This was found using a static code analysis program called cppcheck Signed-off-by: Rickard Strandqvist --- drivers/video/fbdev/omap2/dss/display-sysfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/video/fbdev/omap2/dss/display-sysfs.c b/drivers/video/fbdev/omap2/dss/display-sysfs.c index 5a2095a..5928bc9 100644 --- a/drivers/video/fbdev/omap2/dss/display-sysfs.c +++ b/drivers/video/fbdev/omap2/dss/display-sysfs.c @@ -184,7 +184,7 @@ static ssize_t display_rotate_show(struct device *dev, if (!dssdev->driver->get_rotate) return -ENOENT; rotate = dssdev->driver->get_rotate(dssdev); - return snprintf(buf, PAGE_SIZE, "%u\n", rotate); + return snprintf(buf, PAGE_SIZE, "%d\n", rotate); } static ssize_t display_rotate_store(struct device *dev, @@ -215,7 +215,7 @@ static ssize_t display_mirror_show(struct device *dev, if (!dssdev->driver->get_mirror) return -ENOENT; mirror = dssdev->driver->get_mirror(dssdev); - return snprintf(buf, PAGE_SIZE, "%u\n", mirror); + return snprintf(buf, PAGE_SIZE, "%d\n", mirror); } static ssize_t display_mirror_store(struct device *dev,