From: Joe Perches <joe@perches.com>
To: Harvey Harrison <harvey.harrison@gmail.com>,
Roland Dreier <rdreier@cisco.com>
Cc: David Miller <davem@davemloft.net>,
linux-netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH] infiniband: use %p6 for printing message ids
Date: Tue, 28 Oct 2008 16:02:43 -0700 [thread overview]
Message-ID: <1225234963.5269.228.camel@localhost> (raw)
In-Reply-To: <1225229901.11483.58.camel@brick>
On Tue, 2008-10-28 at 14:38 -0700, Harvey Harrison wrote:
> diff --git a/drivers/infiniband/core/sysfs.c b/drivers/infiniband/core/sysfs.c
> index 4d10421..e985193 100644
> --- a/drivers/infiniband/core/sysfs.c
> +++ b/drivers/infiniband/core/sysfs.c
> @@ -262,15 +262,7 @@ static ssize_t show_port_gid(struct ib_port *p, struct port_attribute *attr,
> if (ret)
> return ret;
>
> - return sprintf(buf, "%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n",
> - be16_to_cpu(((__be16 *) gid.raw)[0]),
> - be16_to_cpu(((__be16 *) gid.raw)[1]),
> - be16_to_cpu(((__be16 *) gid.raw)[2]),
> - be16_to_cpu(((__be16 *) gid.raw)[3]),
> - be16_to_cpu(((__be16 *) gid.raw)[4]),
> - be16_to_cpu(((__be16 *) gid.raw)[5]),
> - be16_to_cpu(((__be16 *) gid.raw)[6]),
> - be16_to_cpu(((__be16 *) gid.raw)[7]));
> + return sprintf(buf, "%p6\n", gid.raw);
I'm not sure any of these should be converted like this.
Infiniband gids are not IPv6 addresses.
I think a new %p<foo> type (maybe: IB) type should be defined for these.
next prev parent reply other threads:[~2008-10-28 23:03 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-28 21:38 [PATCH] infiniband: use %p6 for printing message ids Harvey Harrison
2008-10-28 22:00 ` Roland Dreier
2008-10-28 23:02 ` Joe Perches [this message]
2008-10-28 23:07 ` Roland Dreier
2008-10-28 23:22 ` Joe Perches
2008-10-29 0:16 ` [ofa-general] ***SPAM*** [PATCH] infiniband: Add struct in6_addr addr to union ib_gib Joe Perches
2008-10-29 5:39 ` [ofa-general] " David Miller
2008-10-29 6:58 ` Joe Perches
2008-10-29 8:39 ` David Miller
2008-10-29 18:15 ` Roland Dreier
2008-10-29 5:36 ` [PATCH] infiniband: use %p6 for printing message ids David Miller
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=1225234963.5269.228.camel@localhost \
--to=joe@perches.com \
--cc=davem@davemloft.net \
--cc=harvey.harrison@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=rdreier@cisco.com \
/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;
as well as URLs for NNTP newsgroup(s).