Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mmc: mmc_test: Switch to use %ptSp

Use %ptSp instead of open coded variants to print content of
struct timespec64 in human readable format.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Ulf Hansson <ulf.hansson@linaro.org>
Link: https://patch.msgid.link/20251113150217.3030010-14-andriy.shevchenko@linux.intel.com
Signed-off-by: Petr Mladek <pmladek@suse.com>

authored by

Andy Shevchenko and committed by
Petr Mladek
12158d67 5a1df721

+8 -12
+8 -12
drivers/mmc/core/mmc_test.c
··· 586 586 rate = mmc_test_rate(tot, &ts); 587 587 iops = mmc_test_rate(count * 100, &ts); /* I/O ops per sec x 100 */ 588 588 589 - pr_info("%s: Transfer of %u x %u sectors (%u x %u%s KiB) took " 590 - "%llu.%09u seconds (%u kB/s, %u KiB/s, " 591 - "%u.%02u IOPS, sg_len %d)\n", 592 - mmc_hostname(test->card->host), count, sectors, count, 593 - sectors >> 1, (sectors & 1 ? ".5" : ""), 594 - (u64)ts.tv_sec, (u32)ts.tv_nsec, 595 - rate / 1000, rate / 1024, iops / 100, iops % 100, 596 - test->area.sg_len); 589 + pr_info("%s: Transfer of %u x %u sectors (%u x %u%s KiB) took %ptSp seconds (%u kB/s, %u KiB/s, %u.%02u IOPS, sg_len %d)\n", 590 + mmc_hostname(test->card->host), count, sectors, count, 591 + sectors >> 1, (sectors & 1 ? ".5" : ""), &ts, 592 + rate / 1000, rate / 1024, iops / 100, iops % 100, 593 + test->area.sg_len); 597 594 598 595 mmc_test_save_transfer_result(test, count, sectors, ts, rate, iops); 599 596 } ··· 3071 3074 seq_printf(sf, "Test %d: %d\n", gr->testcase + 1, gr->result); 3072 3075 3073 3076 list_for_each_entry(tr, &gr->tr_lst, link) { 3074 - seq_printf(sf, "%u %d %llu.%09u %u %u.%02u\n", 3075 - tr->count, tr->sectors, 3076 - (u64)tr->ts.tv_sec, (u32)tr->ts.tv_nsec, 3077 - tr->rate, tr->iops / 100, tr->iops % 100); 3077 + seq_printf(sf, "%u %d %ptSp %u %u.%02u\n", 3078 + tr->count, tr->sectors, &tr->ts, tr->rate, 3079 + tr->iops / 100, tr->iops % 100); 3078 3080 } 3079 3081 } 3080 3082