[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1225234963.5269.228.camel@localhost>
Date: Tue, 28 Oct 2008 16:02:43 -0700
From: Joe Perches <joe@...ches.com>
To: Harvey Harrison <harvey.harrison@...il.com>,
Roland Dreier <rdreier@...co.com>
Cc: David Miller <davem@...emloft.net>,
linux-netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH] infiniband: use %p6 for printing message ids
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.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists