[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK8P3a3SVi2odjavRy-ktzcU2sMREVc+8EKxmDq3cv2nGeTeCg@mail.gmail.com>
Date: Mon, 20 Aug 2018 14:39:09 +0200
From: Arnd Bergmann <arnd@...db.de>
To: OGAWA Hirofumi <hirofumi@...l.parknet.co.jp>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Jeff Layton <jlayton@...hat.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] Cleanup "fat: propagate 64-bit inode timestamps" patch
On Sat, Aug 18, 2018 at 2:34 AM OGAWA Hirofumi
<hirofumi@...l.parknet.co.jp> wrote:
>
> Hi,
>
> Looks like I missed the email to read for a patch
> (mmots/broken-out/fat-propagate-64-bit-inode-timestamps.patch). Well,
> so FWIW,
>
> Acked-by: OGAWA Hirofumi <hirofumi@...l.parknet.co.jp>
>
> And additionally cleanup patch here (this would be better to be folded
> into his patch).
>
> Thanks.
> --
> OGAWA Hirofumi <hirofumi@...l.parknet.co.jp>
>
> [PATCH] Cleanup "fat: propagate 64-bit inode timestamps" patch
>
> - Remove useless temporary variable
> - Remove needless long long
>
> Signed-off-by: OGAWA Hirofumi <hirofumi@...l.parknet.co.jp>
Acked-by: Arnd Bergmann <arnd@...db.de>
> /* Linear day numbers of the respective 1sts in non-leap years. */
> -static time64_t days_in_year[] = {
> +static long days_in_year[] = {
> /* Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec */
> 0, 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 0, 0, 0,
> };
While this is correct, changing it back to a signed 'long' type seems
rather arbitrary. I tried to pick a type that would be the same on 32-bit
and 64-bit architectures, the other choice would have been 'u16',
which saves a few bytes.
A completely different approach would be to just use mktime()
and avoid reimplementing it.
Arnd
Powered by blists - more mailing lists