lkml.org 
[lkml]   [2015]   [Sep]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/1] net sysfs: Print link speed as signed integer
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.


\
 
 \ /
  Last update: 2015-09-28 15:21    [W:0.026 / U:0.912 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site