From patchwork Tue May 22 17:56:13 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joe Hershberger X-Patchwork-Id: 160701 X-Patchwork-Delegate: joe.hershberger@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id B8F79B6FA0 for ; Wed, 23 May 2012 03:57:31 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 58A68280EC; Tue, 22 May 2012 19:57:08 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Z71H39VHdUBi; Tue, 22 May 2012 19:57:08 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 08F40280B2; Tue, 22 May 2012 19:56:39 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D495028088 for ; Tue, 22 May 2012 19:56:26 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GHkTvOlRkaO2 for ; Tue, 22 May 2012 19:56:26 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from spamkiller06.natinst.com (mailserver6.natinst.com [130.164.80.6]) by theia.denx.de (Postfix) with ESMTP id 52D012808D for ; Tue, 22 May 2012 19:56:23 +0200 (CEST) Received: from mailserv59-us.natinst.com (nb-hsrp-1338.natinst.com [130.164.19.133]) by spamkiller06.natinst.com (8.14.4/8.14.4) with ESMTP id q4MHuM9w002446 for ; Tue, 22 May 2012 12:56:22 -0500 Received: from localhost.localdomain ([130.164.14.197]) by mailserv59-us.natinst.com (Lotus Domino Release 8.5.2FP3) with ESMTP id 2012052212562211-483876 ; Tue, 22 May 2012 12:56:22 -0500 From: Joe Hershberger To: u-boot@lists.denx.de Date: Tue, 22 May 2012 12:56:13 -0500 Message-Id: <1337709381-27515-4-git-send-email-joe.hershberger@ni.com> X-Mailer: git-send-email 1.6.0.2 In-Reply-To: <1337709381-27515-1-git-send-email-joe.hershberger@ni.com> References: <1337709381-27515-1-git-send-email-joe.hershberger@ni.com> X-MIMETrack: Itemize by SMTP Server on MailServ59-US/AUS/H/NIC(Release 8.5.2FP3|July 10, 2011) at 05/22/2012 12:56:22 PM, Serialize by Router on MailServ59-US/AUS/H/NIC(Release 8.5.2FP3|July 10, 2011) at 05/22/2012 12:56:22 PM, Serialize complete at 05/22/2012 12:56:22 PM X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.6.7580, 1.0.260, 0.0.0000 definitions=2012-05-22_05:2012-05-21, 2012-05-22, 1970-01-01 signatures=0 Cc: Joe Hershberger Subject: [U-Boot] [PATCH] board/esd/cpci405/cpci405.c: Fix compile warning X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Fix this: cpci405.c: In function 'do_get_bpip': cpci405.c:737:4: warning: format '%ld' expects type 'long int', but argument 3 has type 'IPaddr_t' cpci405.c:737:4: warning: format '%ld' expects type 'long int', but argument 4 has type 'IPaddr_t' cpci405.c:737:4: warning: format '%ld' expects type 'long int', but argument 5 has type 'IPaddr_t' cpci405.c:737:4: warning: format '%ld' expects type 'long int', but argument 6 has type 'IPaddr_t' cpci405.c:700:8: warning: unused variable 'bd' Signed-off-by: Joe Hershberger --- board/esd/cpci405/cpci405.c | 7 +------ 1 files changed, 1 insertions(+), 6 deletions(-) diff --git a/board/esd/cpci405/cpci405.c b/board/esd/cpci405/cpci405.c index 1441b10..fb08245 100644 --- a/board/esd/cpci405/cpci405.c +++ b/board/esd/cpci405/cpci405.c @@ -697,7 +697,6 @@ U_BOOT_CMD( */ int do_get_bpip(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { - bd_t *bd = gd->bd; char *buf; ulong crc; char str[32]; @@ -730,11 +729,7 @@ int do_get_bpip(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) /* * Update whole ip-addr */ - sprintf(str, "%ld.%ld.%ld.%ld", - (ipaddr & 0xff000000) >> 24, - (ipaddr & 0x00ff0000) >> 16, - (ipaddr & 0x0000ff00) >> 8, - (ipaddr & 0x000000ff)); + sprintf(str, "%pI4", &ipaddr); setenv("ipaddr", str); printf("Updated ip_addr from bp_eeprom to %s!\n", str); }