Use %ptSp instead of open coded variants to print content of struct timespec64 in human readable format.
Signed-off-by: Andy Shevchenko <[email protected]> --- sound/core/seq/seq_queue.c | 2 +- sound/core/seq/seq_timer.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sound/core/seq/seq_queue.c b/sound/core/seq/seq_queue.c index f5c0e401c8ae..f6e86cbf38bc 100644 --- a/sound/core/seq/seq_queue.c +++ b/sound/core/seq/seq_queue.c @@ -699,7 +699,7 @@ void snd_seq_info_queues_read(struct snd_info_entry *entry, snd_iprintf(buffer, "current tempo : %d\n", tmr->tempo); snd_iprintf(buffer, "tempo base : %d ns\n", tmr->tempo_base); snd_iprintf(buffer, "current BPM : %d\n", bpm); - snd_iprintf(buffer, "current time : %d.%09d s\n", tmr->cur_time.tv_sec, tmr->cur_time.tv_nsec); + snd_iprintf(buffer, "current time : %ptSp s\n", &tmr->cur_time); snd_iprintf(buffer, "current tick : %d\n", tmr->tick.cur_tick); snd_iprintf(buffer, "\n"); } diff --git a/sound/core/seq/seq_timer.c b/sound/core/seq/seq_timer.c index 29b018a212fc..06074d822bae 100644 --- a/sound/core/seq/seq_timer.c +++ b/sound/core/seq/seq_timer.c @@ -442,7 +442,7 @@ void snd_seq_info_timer_read(struct snd_info_entry *entry, int idx; struct snd_seq_timer *tmr; struct snd_timer_instance *ti; - unsigned long resolution; + struct timespec64 resolution; for (idx = 0; idx < SNDRV_SEQ_MAX_QUEUES; idx++) { struct snd_seq_queue *q __free(snd_seq_queue) = queueptr(idx); @@ -457,8 +457,8 @@ void snd_seq_info_timer_read(struct snd_info_entry *entry, if (!ti) break; snd_iprintf(buffer, "Timer for queue %i : %s\n", q->queue, ti->timer->name); - resolution = snd_timer_resolution(ti) * tmr->ticks; - snd_iprintf(buffer, " Period time : %lu.%09lu\n", resolution / 1000000000, resolution % 1000000000); + resolution = ns_to_timespec64(snd_timer_resolution(ti) * tmr->ticks); + snd_iprintf(buffer, " Period time : %ptSp\n", &resolution); snd_iprintf(buffer, " Skew : %u / %u\n", tmr->skew, tmr->skew_base); } } -- 2.50.1
