From patchwork Wed Aug 25 17:20:34 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Khapyorsky X-Patchwork-Id: 132621 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o7PHIobY007857 for ; Wed, 25 Aug 2010 17:18:51 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752891Ab0HYRSu (ORCPT ); Wed, 25 Aug 2010 13:18:50 -0400 Received: from mail-bw0-f46.google.com ([209.85.214.46]:57201 "EHLO mail-bw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752340Ab0HYRSt (ORCPT ); Wed, 25 Aug 2010 13:18:49 -0400 Received: by bwz11 with SMTP id 11so661549bwz.19 for ; Wed, 25 Aug 2010 10:18:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:received:date:from:to :cc:subject:message-id:references:mime-version:content-type :content-disposition:in-reply-to:user-agent; bh=Ue59kmm8S4KTMVbv+AryvIxKP8scmecNqrW2jwBy6oE=; b=UxPObGNq6MgXaSbKDSEn9rLIbEbj8zufffMdjUq1FzoOR3xzqnxLHtxkW9TFAVKwY8 UZi2Gq6e+Guz+K1fywgYkWCGYtfV9wHUlHQLJVzXb3arBxfSk7FHNG2w2kSqVJ0WWqxj /j/oRrofQG60mRUuP39z0/meJZdNosX+ELJIM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=HvRhGwxWhEXAhMJA94acd7AIr+6ncdbOTzMK4TWh1jZOEwRVxggAkM3ry1w2HxFD9v aicMduSCv3jHM6OBsTrPm9EIg4ZdfX53JoTXNPTvAVd/lystSC36UaJtZ4d5oz944MI+ 0FZlhSiuAEn0hmE9z77v5YxbH0J3BdmwC5Srs= Received: by 10.204.60.5 with SMTP id n5mr5877846bkh.162.1282756727960; Wed, 25 Aug 2010 10:18:47 -0700 (PDT) Received: from me.localdomain (87.69.36.170.cable.012.net.il [87.69.36.170]) by mx.google.com with ESMTPS id 11sm1209651bkj.23.2010.08.25.10.18.46 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 25 Aug 2010 10:18:46 -0700 (PDT) Received: by me.localdomain (Postfix, from userid 1000) id C6EEE11EA5; Wed, 25 Aug 2010 20:20:34 +0300 (IDT) Date: Wed, 25 Aug 2010 20:20:34 +0300 From: Sasha Khapyorsky To: Irena Kruchkovsky Cc: Linux RDMA list , "ofw@lists.openfabrics.org" Subject: Re: [ofw] [Patch] [Tools][infiniband-diags] Message-ID: <20100825172034.GN5837@me> References: <20100801171938.GB26625@me> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20100801171938.GB26625@me> User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Wed, 25 Aug 2010 17:18:51 +0000 (UTC) diff --git a/infiniband-diags/src/ibstat.c b/infiniband-diags/src/ibstat.c index c44d8c4..f655a13 100644 --- a/infiniband-diags/src/ibstat.c +++ b/infiniband-diags/src/ibstat.c @@ -72,10 +72,9 @@ static void ca_dump(umad_ca_t * ca) printf("\tNumber of ports: %d\n", ca->numports); printf("\tFirmware version: %s\n", ca->fw_ver); printf("\tHardware version: %s\n", ca->hw_ver); - printf("\tNode GUID: 0x%016llx\n", - (long long unsigned)ntohll(ca->node_guid)); - printf("\tSystem image GUID: 0x%016llx\n", - (long long unsigned)ntohll(ca->system_guid)); + printf("\tNode GUID: 0x%016" PRIx64 "\n", ntohll(ca->node_guid)); + printf("\tSystem image GUID: 0x%016" PRIx64 "\n", + ntohll(ca->system_guid)); } static char *port_state_str[] = { @@ -122,8 +121,7 @@ static int port_dump(umad_port_t * port, int alone) printf("%sLMC: %d\n", pre, port->lmc); printf("%sSM lid: %d\n", pre, port->sm_lid); printf("%sCapability mask: 0x%08x\n", pre, ntohl(port->capmask)); - printf("%sPort GUID: 0x%016llx\n", pre, - (long long unsigned)ntohll(port->port_guid)); + printf("%sPort GUID: 0x%016" PRIx64 "\n", pre, ntohll(port->port_guid)); printf("%sLink layer: %s\n", pre, port->link_layer); return 0; } @@ -182,8 +180,7 @@ static int ports_list(char names[][UMAD_CA_NAME_LEN], int n) for (i = 0; i < found; i++) if (guids[i]) - printf("0x%016llx\n", - (long long unsigned)ntohll(guids[i])); + printf("0x%016" PRIx64 "\n", ntohll(guids[i])); return found; }