RE: [PATCH] rtc: tx4939: avoid unintended sign extension on a 24 bit shift

From: David Laight
Date: Fri Feb 16 2018 - 10:14:11 EST


From: Andy Shevchenko
> Sent: 16 February 2018 14:23
...
> Wouldn't be better to use le32_to_cpu() or get_unaligned()?

Or shoot the members of the ANSI C committee who insisted on
promotion of unsigned char/short to int and sign preserving
promotion of int to unsigned long :-)

David