Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5379058b authored by Thomas Gleixner's avatar Thomas Gleixner Committed by Linus Torvalds
Browse files

[PATCH] fix MTIME_SEC_MAX on 32-bit



The maximum seconds value we can handle on 32bit is LONG_MAX.

Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 014efb1d
Loading
Loading
Loading
Loading
+5 −1
Original line number Original line Diff line number Diff line
@@ -57,7 +57,11 @@ typedef union {
} ktime_t;
} ktime_t;


#define KTIME_MAX			((s64)~((u64)1 << 63))
#define KTIME_MAX			((s64)~((u64)1 << 63))
#if (BITS_PER_LONG == 64)
# define KTIME_SEC_MAX			(KTIME_MAX / NSEC_PER_SEC)
# define KTIME_SEC_MAX			(KTIME_MAX / NSEC_PER_SEC)
#else
# define KTIME_SEC_MAX			LONG_MAX
#endif


/*
/*
 * ktime_t definitions when using the 64-bit scalar representation:
 * ktime_t definitions when using the 64-bit scalar representation: