From patchwork Sun Jul 6 17:35:48 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rickard Strandqvist X-Patchwork-Id: 4490161 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 4A3A9BEEAA for ; Sun, 6 Jul 2014 17:34:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 76BC720265 for ; Sun, 6 Jul 2014 17:34:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A61C62024D for ; Sun, 6 Jul 2014 17:34:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751664AbaGFRee (ORCPT ); Sun, 6 Jul 2014 13:34:34 -0400 Received: from mail-wi0-f176.google.com ([209.85.212.176]:64092 "EHLO mail-wi0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751589AbaGFRed (ORCPT ); Sun, 6 Jul 2014 13:34:33 -0400 Received: by mail-wi0-f176.google.com with SMTP id n3so14898536wiv.15 for ; Sun, 06 Jul 2014 10:34:31 -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=euuNvqslyMPX/nWTzq3C7UyHlXbguasbDVoxKPZKYo8=; b=alkGwBz+MKWgWB28g6od86Afgf+FgBP3s9oiNdxQo9+xOIPgXV3UuMz78ibzwhkrcJ ShZwRYaz9ljdeUp0xQUfWPNZI/vhXPBiBAzRhBE2nHb9uSohHM80Mpv+CPXOVtOLHNbF 8F3gO8XbZkmLG7eqLoQpN2c3R1OozLggd7mcJvdlH5YYKwlDrtfhCSg+1+UmTuwRN2eB giLZgofo+EXGFhXgqedHg2n/qO1aVHix7irGgvjK1aBTc5mX7ADE4h+TM0jHIXrnAdtW wD3KloYE/KAOCznw8JUyxVXCaPvIlKkS+dkDAw3d33AhxWjvpUvEjtvgpMthW3AMdRnv ZIfw== X-Gm-Message-State: ALoCoQkOsmPnx/U/sM6Hq4TvCxaotNuN+6f1sYCybYYydhTRb7Vr7lvVFvMucHUy32fRDEquP8uW X-Received: by 10.180.87.161 with SMTP id az1mr32058568wib.63.1404668071893; Sun, 06 Jul 2014 10:34:31 -0700 (PDT) Received: from localhost.localdomain (h-245-62.a218.priv.bahnhof.se. [85.24.245.62]) by mx.google.com with ESMTPSA id o3sm105160073wiz.24.2014.07.06.10.34.30 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 06 Jul 2014 10:34:31 -0700 (PDT) From: Rickard Strandqvist To: Jean-Christophe Plagniol-Villard , Tomi Valkeinen Cc: Rickard Strandqvist , Jingoo Han , Laurent Pinchart , Rob Clark , 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: Sun, 6 Jul 2014 19:35:48 +0200 Message-Id: <1404668148-15112-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 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,