aboutsummaryrefslogtreecommitdiffstats
path: root/net/unix/af_unix.c
diff options
context:
space:
mode:
authorWang Yaxin <[email protected]>2025-02-08 06:44:00 +0000
committerAndrew Morton <[email protected]>2025-02-18 06:40:02 +0000
commit2272dbc471037b78f308b44351ab1b9f88d32628 (patch)
tree70776037d704edbcc0ec46f12ddd8791cd45dac2 /net/unix/af_unix.c
parentmm/migrate_device: don't add folio to be freed to LRU in migrate_device_final... (diff)
downloadkernel-2272dbc471037b78f308b44351ab1b9f88d32628.tar.gz
kernel-2272dbc471037b78f308b44351ab1b9f88d32628.zip
getdelays: fix error format characters
getdelays had a compilation issue because the format string was not updated when the "delay min" was added. For example, after adding the "delay min" in printf, there were 7 strings but only 6 "%s" format specifiers. Similarly, after adding the 't->cpu_delay_total', there were 7 variables but only 6 format characters specifiers, causing compilation issues as follows. This commit fixes these issues to ensure that getdelays compiles correctly. root@xx:~/linux-next/tools/accounting$ make getdelays.c:199:9: warning: format `%llu' expects argument of type `long long unsigned int', but argument 8 has type `char *' [-Wformat=] 199 | printf("\n\nCPU %15s%15s%15s%15s%15s%15s\n" | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ..... 216 | "delay total", "delay average", "delay max", "delay min", | ~~~~~~~~~~~ | | | char * getdelays.c:200:21: note: format string is defined here 200 | " %15llu%15llu%15llu%15llu%15.3fms%13.6fms\n" | ~~~~~^ | | | long long unsigned int | %15s getdelays.c:199:9: warning: format `%f' expects argument of type `double', but argument 12 has type `long long unsigned int' [-Wformat=] 199 | printf("\n\nCPU %15s%15s%15s%15s%15s%15s\n" | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ..... 220 | (unsigned long long)t->cpu_delay_total, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | long long unsigned int ..... Link: https://lkml.kernel.org/r/[email protected] Fixes: f65c64f311ee ("delayacct: add delay min to record delay peak") Reviewed-by: xu xin <[email protected]> Signed-off-by: Wang Yaxin <[email protected]> Signed-off-by: Kun Jiang <[email protected]> Cc: Balbir Singh <[email protected]> Cc: David Hildenbrand <[email protected]> Cc: Fan Yu <[email protected]> Cc: Peilin He <[email protected]> Cc: Qiang Tu <[email protected]> Cc: wangyong <[email protected]> Cc: ye xingchen <[email protected]> Cc: Yunkai Zhang <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions