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:
parent
c0f2b7811e
commit
695b296681
@ -45,10 +45,11 @@
|
||||
****************************************************************************/
|
||||
|
||||
#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 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
|
||||
* to handle the longest line generated by this logic (plus a couple of
|
||||
|
Loading…
Reference in New Issue
Block a user