summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Fainelli <f.fainelli@gmail.com>2020-06-18 00:02:13 +0200
committerFlorian Fainelli <f.fainelli@gmail.com>2020-06-18 00:02:13 +0200
commite92bc059e7fa5f443e958900229bc7fa1d38fecb (patch)
tree5992e8b09213522501e20441a944a14e04b1eb1c
parentLinux 5.8-rc1 (diff)
parentARM: bcm2835: Fix integer overflow in rpi_firmware_print_firmware_revision() (diff)
downloadlinux-e92bc059e7fa5f443e958900229bc7fa1d38fecb.tar.xz
linux-e92bc059e7fa5f443e958900229bc7fa1d38fecb.zip
Merge tag 'tags/bcm2835-drivers-fixes-2020-0-17' into drivers/fixes
Fixes Raspberry Pi firmware version output Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
-rw-r--r--drivers/firmware/raspberrypi.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/firmware/raspberrypi.c b/drivers/firmware/raspberrypi.c
index ef8098856a47..625c8fdceabf 100644
--- a/drivers/firmware/raspberrypi.c
+++ b/drivers/firmware/raspberrypi.c
@@ -181,6 +181,7 @@ EXPORT_SYMBOL_GPL(rpi_firmware_property);
static void
rpi_firmware_print_firmware_revision(struct rpi_firmware *fw)
{
+ time64_t date_and_time;
u32 packet;
int ret = rpi_firmware_property(fw,
RPI_FIRMWARE_GET_FIRMWARE_REVISION,
@@ -189,7 +190,9 @@ rpi_firmware_print_firmware_revision(struct rpi_firmware *fw)
if (ret)
return;
- dev_info(fw->cl.dev, "Attached to firmware from %ptT\n", &packet);
+ /* This is not compatible with y2038 */
+ date_and_time = packet;
+ dev_info(fw->cl.dev, "Attached to firmware from %ptT\n", &date_and_time);
}
static void