From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sergei Shtylyov Subject: Re: [PATCH] bridge: Fix format string for %ul Date: Sat, 27 Aug 2016 19:18:16 +0300 Message-ID: <59758948-d899-a32f-12af-a56b8c0da6c1@cogentembedded.com> References: <1472267428-810527-1-git-send-email-green@linuxhacker.ru> <11e50e3c-2e1f-4614-07e3-3bd144af4f94@cogentembedded.com> <95BF7F27-59F7-4BDA-941B-BB00C60423A4@linuxhacker.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Cc: netdev@vger.kernel.org, bridge@lists.linux-foundation.org, "David S. Miller" , linux-kernel@vger.kernel.org To: Oleg Drokin Return-path: In-Reply-To: <95BF7F27-59F7-4BDA-941B-BB00C60423A4@linuxhacker.ru> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: bridge-bounces@lists.linux-foundation.org Errors-To: bridge-bounces@lists.linux-foundation.org List-Id: netdev.vger.kernel.org Hello. On 8/27/2016 6:58 PM, Oleg Drokin wrote: >>> %ul would print an unsigned value and a letter l, >>> likely it was %lu that was meant to print the long int, >>> but in reality the values printed there are just regular signed >> >> Signed? Then you need probably "%d" or "%i"… > > They are signed in the struct definition, but in reality they > designate time, so could not be negative, I imagine? That doesn't matter. If the type is signed, it should be printed as signed. Doesn't gcc complain about the format specifiers not matching the values passed? >>> ints, so just dropping the l altogether. >>> >>> Signed-off-by: Oleg Drokin >> [...] MBR, Sergei