From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 90F1332E153; Mon, 10 Nov 2025 18:47:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.16 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762800470; cv=none; b=SSLnyAzGx8PhVJ3Q5kDpWnOZds2zKESA5uYr6gO5olZigOWQ66n9pAx30FL43/+KhNju3qf+1ueq0+rqZs7EtVkH/CL3Cm+gwJA0EqqvuShU5xGv+6dfQWOT3OBEYIRKZcmW9j5HXk2lOdi+ShDICYTUye2fwxgGx5xb5IythhQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762800470; c=relaxed/simple; bh=fCt0uZJtXQzZViSDNcneyMtrnn/y5yDZ8tsLO9qgG3A=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=NdITJFV0lgQWw2tGjuw4ykn0WxdtOiyjVW4a/A6qoJKRmqfB4qNH4hmYGYU9/ZPLjqJ+R8TH3ubD7IdaF2C7tWrJoeCraoeC0MScxM4NKq3gFrLiYmSNPynhtIy5iF3dQINnVX90Y3ggf21oa1SeyZqhfGEzwXx5yxVAs+22mMc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=pass smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=KtJ27YWb; arc=none smtp.client-ip=198.175.65.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="KtJ27YWb" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1762800469; x=1794336469; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=fCt0uZJtXQzZViSDNcneyMtrnn/y5yDZ8tsLO9qgG3A=; b=KtJ27YWbsHcce8I6/xGFR5R7FAE/yv/LWuU5A5cJgXeKvoe9xOePWhHE XyiVJ64KQD2xckH5oCkY6TtBb5R1Gnv7B3/3e8bE9pt6VIXQb4WUFOLVp fEU7UmaZu8ZL4WEIaro1PwFQlE58v8+vAABzMKBp7CjAnOof+y9JE3Hsl TBf2cs4olVEevdS9un6SlLL0J2af+2o8gxs4hs3nYxaJtV9uAWGAd4Q9a qojTHKxTl30fAD2SQ+WlrEuJgaqWXfodEN/oqSOF1SlJ/ofaZLYRPupsH bLc7JHE9CHJst4VjnEq5hvFz7MXanMZaWs5FLwp/+vtxkX55wldOr22pK w==; X-CSE-ConnectionGUID: lcBwhgWwTxWQuoCQ1VpW0A== X-CSE-MsgGUID: mhTJfPhpRHSd9UlLjFo3VQ== X-IronPort-AV: E=McAfee;i="6800,10657,11609"; a="65013788" X-IronPort-AV: E=Sophos;i="6.19,294,1754982000"; d="scan'208";a="65013788" Received: from fmviesa009.fm.intel.com ([10.60.135.149]) by orvoesa108.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Nov 2025 10:47:48 -0800 X-CSE-ConnectionGUID: vLwpzXxWTlqMkVe0jU7QSA== X-CSE-MsgGUID: vqdaBx3wRd2oCOgUpZsMtg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.19,294,1754982000"; d="scan'208";a="189190196" Received: from black.igk.intel.com ([10.91.253.5]) by fmviesa009.fm.intel.com with ESMTP; 10 Nov 2025 10:47:39 -0800 Received: by black.igk.intel.com (Postfix, from userid 1003) id 0116B97; Mon, 10 Nov 2025 19:47:28 +0100 (CET) From: Andy Shevchenko To: Corey Minyard , =?UTF-8?q?Christian=20K=C3=B6nig?= , "Dr. David Alan Gilbert" , Alex Deucher , Thomas Zimmermann , Dmitry Baryshkov , Rob Clark , Matthew Brost , Hans Verkuil , Laurent Pinchart , Ulf Hansson , Andy Shevchenko , Vitaly Lifshits , Manivannan Sadhasivam , Niklas Cassel , Calvin Owens , Sagi Maimon , "Martin K. Petersen" , Karan Tilak Kumar , Casey Schaufler , Steven Rostedt , Petr Mladek , Max Kellermann , Takashi Iwai , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, openipmi-developer@lists.sourceforge.net, linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org, amd-gfx@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org, intel-xe@lists.freedesktop.org, linux-mmc@vger.kernel.org, netdev@vger.kernel.org, intel-wired-lan@lists.osuosl.org, linux-pci@vger.kernel.org, linux-s390@vger.kernel.org, linux-scsi@vger.kernel.org, linux-staging@lists.linux.dev, ceph-devel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-sound@vger.kernel.org Cc: Rasmus Villemoes , Sergey Senozhatsky , Jonathan Corbet , Sumit Semwal , Gustavo Padovan , David Airlie , Simona Vetter , Maarten Lankhorst , Maxime Ripard , Dmitry Baryshkov , Abhinav Kumar , Jessica Zhang , Sean Paul , Marijn Suijten , Konrad Dybcio , Lucas De Marchi , =?UTF-8?q?Thomas=20Hellstr=C3=B6m?= , Rodrigo Vivi , Mauro Carvalho Chehab , Vladimir Oltean , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Tony Nguyen , Przemek Kitszel , =?UTF-8?q?Krzysztof=20Wilczy=C5=84ski?= , Kishon Vijay Abraham I , Bjorn Helgaas , Rodolfo Giometti , Jonathan Lemon , Vadim Fedorenko , Richard Cochran , Stefan Haberland , Jan Hoeppner , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Satish Kharat , Sesidhar Baddela , "James E.J. Bottomley" , Greg Kroah-Hartman , Xiubo Li , Ilya Dryomov , Masami Hiramatsu , Mathieu Desnoyers , Andrew Morton , Jaroslav Kysela , Takashi Iwai Subject: [PATCH v1 02/23] ALSA: seq: Switch to use %ptSp Date: Mon, 10 Nov 2025 19:40:21 +0100 Message-ID: <20251110184727.666591-3-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20251110184727.666591-1-andriy.shevchenko@linux.intel.com> References: <20251110184727.666591-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-doc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Use %ptSp instead of open coded variants to print content of struct timespec64 in human readable format. Signed-off-by: Andy Shevchenko --- 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