public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Florian Westphal <fw@strlen.de>
To: Alexander Stein <alexander.stein@systec-electronic.com>
Cc: "David S. Miller" <davem@davemloft.net>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] net sysfs: Print link speed as signed integer
Date: Mon, 28 Sep 2015 15:00:31 +0200	[thread overview]
Message-ID: <20150928130031.GA19923@breakpoint.cc> (raw)
In-Reply-To: <1443444529-12868-1-git-send-email-alexander.stein@systec-electronic.com>

Alexander Stein <alexander.stein@systec-electronic.com> wrote:
> Otherwise 4294967295 (MBit/s) (-1) will be printed when there is no link.
> Documentation/ABI/testing/sysfs-class-net does not state if this shall be
> signed or unsigned.
> 
> Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
> ---
> diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c
> index 805a95a..e3f7eea 100644
> --- a/net/core/net-sysfs.c
> +++ b/net/core/net-sysfs.c
> @@ -31,7 +31,7 @@
>  static const char fmt_hex[] = "%#x\n";
>  static const char fmt_long_hex[] = "%#lx\n";
>  static const char fmt_dec[] = "%d\n";
> -static const char fmt_udec[] = "%u\n";
> +static const char fmt_udec[] = "%d\n";
>  static const char fmt_ulong[] = "%lu\n";
>  static const char fmt_u64[] = "%llu\n";

That looks bogus.  If this is about 'speed' attribute
consider removing fmt_udec and replace the printf specifier
of speed_show with fmt_dec instead.

      reply	other threads:[~2015-09-28 13:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-28 12:48 [PATCH 1/1] net sysfs: Print link speed as signed integer Alexander Stein
2015-09-28 13:00 ` Florian Westphal [this message]

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=20150928130031.GA19923@breakpoint.cc \
    --to=fw@strlen.de \
    --cc=alexander.stein@systec-electronic.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.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