From 02e92d2ba570216b82e714b499e682989e18f41a Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Fri, 23 Dec 2022 17:31:04 +0800 Subject: [PATCH] Fix ower/pm/pm_procfs.c:46:15: error: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'time_t' {aka 'long long int'} Signed-off-by: Xiang Xiao --- drivers/power/pm/pm_procfs.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/drivers/power/pm/pm_procfs.c b/drivers/power/pm/pm_procfs.c index 924c8a1ab23..bd6ad8bb7a5 100644 --- a/drivers/power/pm/pm_procfs.c +++ b/drivers/power/pm/pm_procfs.c @@ -43,11 +43,17 @@ ****************************************************************************/ #define STHDR "DOMAIN%d WAKE SLEEP TOTAL\n" -#define STFMT "%-8s %8" PRIu32 "s %02" PRIu32 "%% %8" PRIu32 "s %02" \ - PRIu32 "%% %8" PRIu32 "s %02" PRIu32 "%%\n" - #define WAHDR "DOMAIN%d STATE COUNT TIME\n" -#define WAFMT "%-12s %-10s %4" PRIu32 " %8" PRIu32 "s\n" + +#ifdef CONFIG_SYSTEM_TIME64 +# define STFMT "%-8s %8" PRIu64 "s %02" PRIu64 "%% %8" PRIu64 "s %02" \ + PRIu64 "%% %8" PRIu64 "s %02" PRIu64 "%%\n" +# define WAFMT "%-12s %-10s %4" PRIu32 " %8" PRIu64 "s\n" +#else +# define STFMT "%-8s %8" PRIu32 "s %02" PRIu32 "%% %8" PRIu32 "s %02" \ + PRIu32 "%% %8" PRIu32 "s %02" PRIu32 "%%\n" +# define WAFMT "%-12s %-10s %4" PRIu32 " %8" PRIu32 "s\n" +#endif /* Determines the size of an intermediate buffer that must be large enough * to handle the longest line generated by this logic (plus a couple of