From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6208922267806597120 X-Received: by 10.25.24.74 with SMTP id o71mr127028lfi.9.1445628901512; Fri, 23 Oct 2015 12:35:01 -0700 (PDT) X-BeenThere: outreachy-kernel@googlegroups.com Received: by 10.25.141.198 with SMTP id p189ls483280lfd.79.gmail; Fri, 23 Oct 2015 12:35:00 -0700 (PDT) X-Received: by 10.112.173.170 with SMTP id bl10mr5345481lbc.7.1445628900659; Fri, 23 Oct 2015 12:35:00 -0700 (PDT) Return-Path: Received: from mout.kundenserver.de (mout.kundenserver.de. [212.227.17.24]) by gmr-mx.google.com with ESMTPS id cm6si339004wib.1.2015.10.23.12.34.59 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Oct 2015 12:35:00 -0700 (PDT) Received-SPF: neutral (google.com: 212.227.17.24 is neither permitted nor denied by best guess record for domain of arnd@arndb.de) client-ip=212.227.17.24; Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 212.227.17.24 is neither permitted nor denied by best guess record for domain of arnd@arndb.de) smtp.mailfrom=arnd@arndb.de Received: from wuerfel.localnet ([134.3.118.24]) by mrelayeu.kundenserver.de (mreue102) with ESMTPSA (Nemesis) id 0MC1MO-1Zgwfi1CKW-008q5L; Fri, 23 Oct 2015 21:34:58 +0200 From: Arnd Bergmann To: outreachy-kernel@googlegroups.com Cc: Amitoj Kaur Chawla , y2038@lists.linaro.org Subject: Re: [Outreachy kernel] Re: [Y2038] [PATCH] char: ipmi: ipmi_ssif: Replace timeval with timespec64 Date: Fri, 23 Oct 2015 21:34:57 +0200 Message-ID: <3885032.B7rTY3eIDR@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: References: <20151023190922.GA32154@amitoj-Inspiron-3542> <7971017.NMVUFoYCm6@wuerfel> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii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ur Chawla wrote: > On Sat, Oct 24, 2015 at 12:53 AM, Arnd Bergmann wrote: > > On Saturday 24 October 2015 00:39:22 Amitoj Kaur Chawla wrote: > >> This patch replaces timeval with timespec64 as 32 bit 'struct timeval' > >> will not give current time beyond 2038. > >> > >> The patch changes the code to use ktime_get_real_ts64() which returns > >> a 'struct timespec64' instead of do_gettimeofday() which returns a > >> 'struct timeval' > >> > >> This patch also alters the format strings in pr_info() for now.tv_sec > >> and now.tv_nsec to incorporate 'long long' on 32 bit architectures and > >> leading zeroes respectively. > >> > >> Signed-off-by: Amitoj Kaur Chawla > >> --- > > > > The patch looks correct, but I think that this time the format string > > was actually ok already for the microsecond value. Just leave it at "%6.6ld" > > and send it again with the maintainers on Cc. > > > > Oh okay can I ask the reason that the change was required there but not here? > > The other one was "%lu", which has no leading zeroes, while this one was "%6.6ld", which does. I keep getting confused by printf format strings and sometimes have to try these out myself, but my understanding is that these all behave the same way: "%06ld" "%.6ld" "%6.6ld" "%6.06ld" Arnd