From patchwork Sat Jul 5 13:18:37 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rickard Strandqvist X-Patchwork-Id: 4488461 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 63A15BEECB for ; Sat, 5 Jul 2014 13:17:35 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A39FE202BE for ; Sat, 5 Jul 2014 13:17:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CDFD7203EB for ; Sat, 5 Jul 2014 13:17:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754499AbaGENRW (ORCPT ); Sat, 5 Jul 2014 09:17:22 -0400 Received: from mail-we0-f179.google.com ([74.125.82.179]:44384 "EHLO mail-we0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753438AbaGENRV (ORCPT ); Sat, 5 Jul 2014 09:17:21 -0400 Received: by mail-we0-f179.google.com with SMTP id w62so2609780wes.10 for ; Sat, 05 Jul 2014 06:17:20 -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=cQk7wRgJCmbKbAbl5lAhdrKbE2jJpcW8rbW1SLPfQ6o=; b=A+KwvBks/+peZe7XlDqufDXRpmXquu+vXFaiC1bN54ZKBBibATntb86L9OD362uHbS PMiJUgR3QsbSn/R6231mqWVxiJNDG15/fJyACB3nY5mhXkYtsLMQJSM2MpCpDkZf7oiv 6F3c+aE82nkEXu5mYQqBCTgh7o+Zuz9nMYNREQhevFI/iG45Pen5xqS/3riF4RAwRFti QRNKXb2TVY42BPZ2bmUWzvSGFoJNEB+WEl6M2AMfQlzdgstpTLbJnOuunjpWizq3OHBC WV1R4tQtN76z2oDUBBaqMgHvLyR/IECN+t3U/Eyywbn/shxaQTuRbEvaCX9rqeJLveYF 08Og== X-Gm-Message-State: ALoCoQm0C7Q9PqM/o2e1jLRIUa98Md0O0Hz92GUpuAMLJM48Dt2muwwNAZ7Rxr2pS5lIPnRAM5Xv X-Received: by 10.195.11.34 with SMTP id ef2mr2111071wjd.123.1404566240374; Sat, 05 Jul 2014 06:17:20 -0700 (PDT) Received: from localhost.localdomain (h-245-62.a218.priv.bahnhof.se. [85.24.245.62]) by mx.google.com with ESMTPSA id ex4sm91078534wic.2.2014.07.05.06.17.18 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 05 Jul 2014 06:17:19 -0700 (PDT) From: Rickard Strandqvist To: Jean-Christophe Plagniol-Villard , Tomi Valkeinen Cc: Rickard Strandqvist , Rickard Strandqvist , Jingoo Han , Daniel Vetter , Joe Perches , Laurent Pinchart , linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] video: fbdev: sis: sis_main.c: Cleaning up wrong type in format string Date: Sat, 5 Jul 2014 15:18:37 +0200 Message-Id: <1404566317-22987-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/sis/sis_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/fbdev/sis/sis_main.c b/drivers/video/fbdev/sis/sis_main.c index 22ad028..ab7e5e4 100644 --- a/drivers/video/fbdev/sis/sis_main.c +++ b/drivers/video/fbdev/sis/sis_main.c @@ -237,7 +237,7 @@ static void sisfb_get_vga_mode_from_kernel(void) if(mydepth == 24) mydepth = 32; - sprintf(mymode, "%ux%ux%u", screen_info.lfb_width, + sprintf(mymode, "%ux%ux%d", screen_info.lfb_width, screen_info.lfb_height, mydepth);