From patchwork Wed Mar 6 09:43:40 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 225460 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:4978:20e::2]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 755602C0362 for ; Wed, 6 Mar 2013 20:45:24 +1100 (EST) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UDAt7-0001hj-Fm; Wed, 06 Mar 2013 09:43:53 +0000 Received: from metis.ext.pengutronix.de ([2001:6f8:1178:4:290:27ff:fe1d:cc33]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UDAt4-0001hQ-DS for linux-mtd@lists.infradead.org; Wed, 06 Mar 2013 09:43:51 +0000 Received: from dude.hi.pengutronix.de ([2001:6f8:1178:2:21e:67ff:fe11:9c5c]) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1UDAsz-0002Nk-J7; Wed, 06 Mar 2013 10:43:45 +0100 Received: from ukl by dude.hi.pengutronix.de with local (Exim 4.80) (envelope-from ) id 1UDAsz-0003eT-8s; Wed, 06 Mar 2013 10:43:45 +0100 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= To: Artem Bityutskiy Subject: [PATCH v2] flash_otp_write: fix format string warning Date: Wed, 6 Mar 2013 10:43:40 +0100 Message-Id: <1362563020-14003-1-git-send-email-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 1.8.2.rc2 In-Reply-To: <1362561546.21850.24.camel@sauron> References: <1362561546.21850.24.camel@sauron> MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2001:6f8:1178:2:21e:67ff:fe11:9c5c X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-mtd@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130306_044350_693568_6CA47878 X-CRM114-Status: GOOD ( 11.35 ) X-Spam-Score: -2.5 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.5 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.6 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: linux-mtd@lists.infradead.org, kernel@pengutronix.de X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org This fixes flash_otp_write.c: In function 'main': flash_otp_write.c:61:2: warning: format '%lx' expects argument of type 'long unsigned int', but argument 3 has type 'off_t' [-Wformat] Signed-off-by: Uwe Kleine-König --- Notes: Changes since (implicit) v1, sent with Message-Id: <1361378469-18631-1-git-send-email-u.kleine-koenig@pengutronix.de>: - Use PRIdoff_t helper as suggested by Artem flash_otp_write.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/flash_otp_write.c b/flash_otp_write.c index d407ebb..f360a3e 100644 --- a/flash_otp_write.c +++ b/flash_otp_write.c @@ -15,6 +15,8 @@ #include +#include "common.h" + int main(int argc,char *argv[]) { int fd, val, ret, size, wrote, len; @@ -58,7 +60,8 @@ int main(int argc,char *argv[]) return errno; } - printf("Writing OTP user data on %s at offset 0x%lx\n", argv[2], offset); + printf("Writing OTP user data on %s at offset 0x%" PRIdoff_t "\n", + argv[2], offset); if (mtdInfo.type == MTD_NANDFLASH) len = mtdInfo.writesize;