Hey Sasha,
Nothing fancy. Was just inconsistent.
Al
--
Albert Chu
[EMAIL PROTECTED]
Computer Scientist
High Performance Systems Division
Lawrence Livermore National Laboratory
>From 11afc1b99a971689128743bd230283e69b2b2195 Mon Sep 17 00:00:00 2001
From: Albert Chu <[EMAIL PROTECTED]>
Date: Tue, 7 Oct 2008 09:20:14 -0700
Subject: [PATCH] create/use ALL_PORTS macro for clarity
Signed-off-by: Albert Chu <[EMAIL PROTECTED]>
---
infiniband-diags/src/perfquery.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/infiniband-diags/src/perfquery.c b/infiniband-diags/src/perfquery.c
index ce8f342..a596a59 100644
--- a/infiniband-diags/src/perfquery.c
+++ b/infiniband-diags/src/perfquery.c
@@ -53,6 +53,8 @@ static uint8_t pc[1024];
char *argv0 = "perfquery";
+#define ALL_PORTS 0xFF
+
static void
usage(void)
{
@@ -139,7 +141,7 @@ main(int argc, char **argv)
break;
case 'a':
all++;
- port = 0xff;
+ port = ALL_PORTS;
break;
case 'd':
ibdebug++;
@@ -198,7 +200,7 @@ main(int argc, char **argv)
memcpy(&cap_mask, pc+2, sizeof(cap_mask)); /* CapabilityMask */
cap_mask = ntohs(cap_mask);
if (!(cap_mask & 0x100)) /* bit 8 is AllPortSelect */
- if (port == 255) {
+ if (port == ALL_PORTS) {
allports = 1;
IBWARN("AllPortSelect not supported");
}
@@ -232,7 +234,7 @@ main(int argc, char **argv)
IBERROR("perfquery");
if (allports == 1)
- pc[1] = 255; /* fake PortSelect */
+ pc[1] = ALL_PORTS; /* fake PortSelect */
mad_dump_perfcounters(buf, sizeof buf, pc, sizeof pc);
} else {
@@ -243,7 +245,7 @@ main(int argc, char **argv)
IBERROR("perfextquery");
if (allports == 1)
- pc[1] = 255; /* fake PortSelect */
+ pc[1] = ALL_PORTS; /* fake PortSelect */
mad_dump_perfcounters_ext(buf, sizeof buf, pc, sizeof pc);
}
--
1.5.4.5
_______________________________________________
general mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general
To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general