On Sunday 01 November 2015 16:09:18 Amitoj Kaur Chawla wrote:
32 bit systems using 'struct timeval' will overflow in the year 2038, so we modify the code appropriately.
This patch replaces the use of struct timeval and do_gettimeofday() with ktime_get_real_seconds() which returns a 64 bit seconds value.
Signed-off-by: Amitoj Kaur Chawla amitoj1606@gmail.com
drivers/block/sx8.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/block/sx8.c b/drivers/block/sx8.c index 59c91d4..cf87d9d 100644 --- a/drivers/block/sx8.c +++ b/drivers/block/sx8.c @@ -361,7 +361,7 @@ struct carm_msg_sync_time { u16 reserved1; __le32 handle; u32 reserved2;
- __le32 timestamp;
- __le64 timestamp;
} __attribute__((packed));
This data structure is shared with the firmware, which means you cannot change the layout. Better truncate to 32 bit and add a comment about this breaking in 2106.
Arnd