From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754601AbcH0QSV (ORCPT ); Sat, 27 Aug 2016 12:18:21 -0400 Received: from mail-lf0-f50.google.com ([209.85.215.50]:33808 "EHLO mail-lf0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753953AbcH0QST (ORCPT ); Sat, 27 Aug 2016 12:18:19 -0400 Subject: Re: [PATCH] bridge: Fix format string for %ul To: Oleg Drokin References: <1472267428-810527-1-git-send-email-green@linuxhacker.ru> <11e50e3c-2e1f-4614-07e3-3bd144af4f94@cogentembedded.com> <95BF7F27-59F7-4BDA-941B-BB00C60423A4@linuxhacker.ru> Cc: Stephen Hemminger , "David S. Miller" , bridge@lists.linux-foundation.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org From: Sergei Shtylyov Message-ID: <59758948-d899-a32f-12af-a56b8c0da6c1@cogentembedded.com> Date: Sat, 27 Aug 2016 19:18:16 +0300 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <95BF7F27-59F7-4BDA-941B-BB00C60423A4@linuxhacker.ru> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@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