pm: fix build warning

power/pm_procfs.c:282:27: warning: format specifies type 'unsigned long' but the argument has type 'time_t' (aka 'unsigned int') [-Wformat]
                          dom->wake[state].tv_sec,
                          ^~~~~~~~~~~~~~~~~~~~~~~
make[2]: Entering directory '/home/ligd/platform/m2/audio/frameworks/media'
power/pm_procfs.c:283:27: warning: format specifies type 'unsigned long' but the argument has type 'unsigned int' [-Wformat]
                          100 * dom->wake[state].tv_sec / sum,
                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
power/pm_procfs.c:284:27: warning: format specifies type 'unsigned long' but the argument has type 'time_t' (aka 'unsigned int') [-Wformat]
                          dom->sleep[state].tv_sec,
                          ^~~~~~~~~~~~~~~~~~~~~~~~
power/pm_procfs.c:285:27: warning: format specifies type 'unsigned long' but the argument has type 'unsigned int' [-Wformat]
                          100 * dom->sleep[state].tv_sec / sum,
                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
power/pm_procfs.c:286:27: warning: format specifies type 'unsigned long' but the argument has type 'time_t' (aka 'unsigned int') [-Wformat]
                          total.tv_sec,
                          ^~~~~~~~~~~~
power/pm_procfs.c:287:27: warning: format specifies type 'unsigned long' but the argument has type 'unsigned int' [-Wformat]
                          100 * total.tv_sec / sum);
                          ^~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
ligd 2022-06-21 10:44:26 +08:00 committed by Xiang Xiao
parent c0f2b7811e
commit 695b296681

View File

@ -45,10 +45,11 @@
****************************************************************************/ ****************************************************************************/
#define STHDR "DOMAIN%d WAKE SLEEP TOTAL\n" #define STHDR "DOMAIN%d WAKE SLEEP TOTAL\n"
#define STFMT "%-8s %8lus %02lu%% %8lus %02lu%% %8lus %02lu%%\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 WAHDR "DOMAIN%d STATE COUNT TIME\n"
#define WAFMT "%-12s %-10s %4lu %8lus\n" #define WAFMT "%-12s %-10s %4" PRIu32 " %8" PRIu32 "s\n"
/* Determines the size of an intermediate buffer that must be large enough /* 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 * to handle the longest line generated by this logic (plus a couple of