Date: Wed, 18 Jun 2025 16:01:12 GMT From: Olivier Certner <olce@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 013c58ced6ae - main - sched_ule: 32-bit platforms: Fix runq_print() after runq changes Message-ID: <202506181601.55IG1ChL082010@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=013c58ced6aef26bad7ca5c6eb829b9d586f6edb commit 013c58ced6aef26bad7ca5c6eb829b9d586f6edb Author: Olivier Certner <olce@FreeBSD.org> AuthorDate: 2025-06-18 15:15:18 +0000 Commit: Olivier Certner <olce@FreeBSD.org> CommitDate: 2025-06-18 16:00:13 +0000 sched_ule: 32-bit platforms: Fix runq_print() after runq changes The compiler would report a mismatch between the format and the actual type of the runqueue status word because the latter is now unconditionally defined as an 'unsigned long' (which has the "natural" platform size) and the format expects a 'size_t', which expands to an 'unsigned int' on 32-bit platforms (although they are both of the same actual size). This worked before as the C type used depended on the architecture and was set to 'uint32_t' aka 'unsigned int' on these 32-bit platforms. Just fix the format (use 'l'). While here, remove outputting '0x' by hand, instead relying on '#' (only difference is for 0, and is fine). runq_print() should be moved out of 'sched_ule.c' in a subsequent commit. Reported by: Jenkins Fixes: 79d8a99ee583 ("runq: Deduce most parameters, remove machine headers") MFC after: 1 month Event: Kitchener-Waterloo Hackathon 202506 Sponsored by: The FreeBSD Foundation --- sys/kern/sched_ule.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/sched_ule.c b/sys/kern/sched_ule.c index 0002424fa547..508ec0ab97ec 100644 --- a/sys/kern/sched_ule.c +++ b/sys/kern/sched_ule.c @@ -444,7 +444,7 @@ runq_print(struct runq *rq) int i; for (i = 0; i < RQSW_NB; i++) { - printf("\t\trunq bits %d 0x%zx\n", + printf("\t\trunq bits %d %#lx\n", i, rq->rq_status.rq_sw[i]); for (j = 0; j < RQSW_BPW; j++) if (rq->rq_status.rq_sw[i] & (1ul << j)) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202506181601.55IG1ChL082010>