From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933714AbbI2POI (ORCPT ); Tue, 29 Sep 2015 11:14:08 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54345 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933384AbbI2PNt (ORCPT ); Tue, 29 Sep 2015 11:13:49 -0400 Reply-To: jgh@redhat.com Subject: Re: [PATCH v2 1/1] net sysfs: Print link speed as signed integer References: <1443445533-14474-1-git-send-email-alexander.stein@systec-electronic.com> Cc: linux-kernel@vger.kernel.org To: netdev@vger.kernel.org From: Jeremy Harris Organization: Red Hat Message-ID: <560AAAAA.1020605@redhat.com> Date: Tue, 29 Sep 2015 16:13:46 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <1443445533-14474-1-git-send-email-alexander.stein@systec-electronic.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 28/09/15 14:05, Alexander Stein 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. > Also remove the now unused variable fmt_udec. [...] > - ret = sprintf(buf, fmt_udec, ethtool_cmd_speed(&cmd)); > + ret = sprintf(buf, fmt_dec, ethtool_cmd_speed(&cmd)); If we print anything numeric, why is zero not appropriate (which would still be unsigned)? -- Cheers, Jeremy