public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Hal Rosenstock <hnrose-Wuw85uim5zDR7s880joybQ@public.gmane.org>
To: sashak-smomgflXvOZWk0Htik3J/w@public.gmane.org
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: [PATCH] infiniband-diags/ibqueryerrors.c: Fix output format of counters
Date: Tue, 29 Dec 2009 09:30:49 -0500	[thread overview]
Message-ID: <20091229143049.GA20458@comcast.net> (raw)


Should be unsigned decimal rather than plain decimal

Signed-off-by: Hal Rosenstock <hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
diff --git a/infiniband-diags/src/ibqueryerrors.c b/infiniband-diags/src/ibqueryerrors.c
index 370c74d..47bd2af 100644
--- a/infiniband-diags/src/ibqueryerrors.c
+++ b/infiniband-diags/src/ibqueryerrors.c
@@ -226,7 +226,7 @@ static int print_xmitdisc_details(char *buf, size_t size, ib_portid_t * portid,
 	     i++) {
 		mad_decode_field(pc, i, (void *)&val);
 		if (val)
-			n += snprintf(buf + n, size - n, " [%s == %d]",
+			n += snprintf(buf + n, size - n, " [%s == %u]",
 				      mad_field_name(i), val);
 	}
 	return n;
@@ -251,7 +251,7 @@ static void print_results(ib_portid_t * portid, char *node_name,
 
 		mad_decode_field(pc, i, (void *)&val);
 		if (val)
-			n += snprintf(str + n, 1024 - n, " [%s == %d]",
+			n += snprintf(str + n, 1024 - n, " [%s == %u]",
 				      mad_field_name(i), val);
 
 		/* If there are PortXmitDiscards, get details (if supported) */
@@ -264,7 +264,7 @@ static void print_results(ib_portid_t * portid, char *node_name,
 	if (!suppress(IB_PC_XMT_WAIT_F)) {
 		mad_decode_field(pc, IB_PC_XMT_WAIT_F, (void *)&val);
 		if (val)
-			n += snprintf(str + n, 1024 - n, " [%s == %d]",
+			n += snprintf(str + n, 1024 - n, " [%s == %u]",
 				      mad_field_name(IB_PC_XMT_WAIT_F), val);
 	}
 
@@ -276,7 +276,7 @@ static void print_results(ib_portid_t * portid, char *node_name,
 				mad_decode_field(pc, i, (void *)&val64);
 				if (val64)
 					n += snprintf(str + n, 1024 - n,
-						      " [%s == %" PRId64 "]",
+						      " [%s == %" PRIu64 "]",
 						      mad_field_name(i), val64);
 			}
 
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

             reply	other threads:[~2009-12-29 14:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-29 14:30 Hal Rosenstock [this message]
     [not found] ` <20091229143049.GA20458-Wuw85uim5zDR7s880joybQ@public.gmane.org>
2009-12-29 14:57   ` [PATCH] infiniband-diags/ibqueryerrors.c: Fix output format of counters Sasha Khapyorsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20091229143049.GA20458@comcast.net \
    --to=hnrose-wuw85uim5zdr7s880joybq@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=sashak-smomgflXvOZWk0Htik3J/w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox