netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: jiri@resnulli.us
Cc: netdev@vger.kernel.org, stephen@networkplumber.org,
	Narendra_K@Dell.com, bhutchings@solarflare.com,
	john.r.fastabend@intel.com, or.gerlitz@gmail.com
Subject: Re: [patch net-next v3 3/3] net: export physical port id via sysfs
Date: Wed, 24 Jul 2013 16:01:18 -0700 (PDT)	[thread overview]
Message-ID: <20130724.160118.1940783900135820589.davem@davemloft.net> (raw)
In-Reply-To: <1374498317-6442-4-git-send-email-jiri@resnulli.us>

From: Jiri Pirko <jiri@resnulli.us>
Date: Mon, 22 Jul 2013 15:05:17 +0200

> +static size_t _format_port_id(char *buf, int buflen,
> +			      const unsigned char *id, int len)
> +{
> +	int i;
> +	char *cp = buf;
> +
> +	for (i = 0; i < len; i++)
> +		cp += scnprintf(cp, buflen - (cp - buf), "%02x", id[i]);
> +	return cp - buf;
> +}

This is "%phN", please use the printf strings we have support for
in the kernel instead of reimplementing them :-)

  reply	other threads:[~2013-07-24 23:01 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-22 13:05 [patch net-next v3 0/3] export device physical port id to userspace Jiri Pirko
2013-07-22 13:05 ` [patch net-next v3 1/3] net: add ndo to get id of physical port of the device Jiri Pirko
2013-07-22 13:44   ` Narendra_K
2013-07-22 15:59   ` Or Gerlitz
2013-07-22 18:01     ` Jiri Pirko
2013-07-22 18:37       ` Or Gerlitz
2013-07-22 13:05 ` [patch net-next v3 2/3] rtnl: export physical port id via RT netlink Jiri Pirko
2013-07-22 13:05 ` [patch net-next v3 3/3] net: export physical port id via sysfs Jiri Pirko
2013-07-24 23:01   ` David Miller [this message]
2013-07-24 23:00 ` [patch net-next v3 0/3] export device physical port id to userspace David Miller
2013-07-25  7:41   ` Jiri Pirko

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=20130724.160118.1940783900135820589.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=Narendra_K@Dell.com \
    --cc=bhutchings@solarflare.com \
    --cc=jiri@resnulli.us \
    --cc=john.r.fastabend@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=or.gerlitz@gmail.com \
    --cc=stephen@networkplumber.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;
as well as URLs for NNTP newsgroup(s).