Skip to contentSkip to conversation

firmware: raspberrypi: Eliminate use of time_to_tm

PATCH In review Himanshu Jha 2 participants 2 messages Nov 4, 2017 – Nov 7, 2017 Broadcom BCM2711/BCM2835 Arm architecture

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 firmware: raspberrypi: Eliminate use of time_to_tm

time_to_tm function is deprecated due to y2038 problem, therefore use time64_to_tm instead.

---
 drivers/firmware/raspberrypi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/firmware/raspberrypi.c +2 -2
index dd506cd..aa4c797 100644
@@ -166,7 +166,7 @@ EXPORT_SYMBOL_GPL(rpi_firmware_property);
 static void
 rpi_firmware_print_firmware_revision(struct rpi_firmware *fw)
 {
-	u32 packet;
+	time64_t packet;
 	int ret = rpi_firmware_property(fw,
 					RPI_FIRMWARE_GET_FIRMWARE_REVISION,
 					&packet, sizeof(packet));
@@ -174,7 +174,7 @@ rpi_firmware_print_firmware_revision(struct rpi_firmware *fw)
 	if (ret == 0) {
 		struct tm tm;
 
-		time_to_tm(packet, 0, &tm);
+		time64_to_tm(packet, 0, &tm);
 
 		dev_info(fw->cl.dev,
 			 "Attached to firmware from %04ld-%02d-%02d %02d:%02d\n",
Signature · 1 line
2.7.4
#1 lore raw
Quoted 2 lines · Himanshu Jha

time_to_tm function is deprecated due to y2038 problem, therefore use time64_to_tm instead.

Use ./scripts/get_maintainer.pl foo.patch and resend with the respective folks addressed to as needed (To or Cc as indicated by the script).

Your commit log should reference why *time_to_tm()* is now deprecated in favor for time64_to_tm() to make maintainer's lives easier so that their lookup is faster.

Resend with these details. Likewise for the other patches for which you failed to do any of this for.

Luis

Quoted 31 lines
---
 drivers/firmware/raspberrypi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/firmware/raspberrypi.c +2 -2
index dd506cd..aa4c797 100644
@@ -166,7 +166,7 @@ EXPORT_SYMBOL_GPL(rpi_firmware_property);
 static void
 rpi_firmware_print_firmware_revision(struct rpi_firmware *fw)
 {
-	u32 packet;
+	time64_t packet;
 	int ret = rpi_firmware_property(fw,
 					RPI_FIRMWARE_GET_FIRMWARE_REVISION,
 					&packet, sizeof(packet));
@@ -174,7 +174,7 @@ rpi_firmware_print_firmware_revision(struct rpi_firmware *fw)
 	if (ret == 0) {
 		struct tm tm;
 
-		time_to_tm(packet, 0, &tm);
+		time64_to_tm(packet, 0, &tm);
 
 		dev_info(fw->cl.dev,
 			 "Attached to firmware from %04ld-%02d-%02d %02d:%02d\n",
Signature · 1 line
2.7.4
Signature · 2 lines
Luis Rodriguez, SUSE LINUX GmbH
Maxfeldstrasse 5; D-90409 Nuernberg