From: Yury Norov <ynorov@nvidia•com>
To: linux-kernel@vger•kernel.org,
"Christophe Leroy (CS GROUP)" <chleroy@kernel•org>,
"David S. Miller" <davem@davemloft•net>,
"Peter Zijlstra (Intel)" <peterz@infradead•org>,
"Rafael J. Wysocki" <rafael@kernel•org>,
Alexander Shishkin <alexander.shishkin@linux•intel.com>,
Andrew Lunn <andrew+netdev@lunn•ch>,
Andrew Morton <akpm@linux-foundation•org>,
Antoine Tenart <atenart@kernel•org>,
Christian Brauner <brauner@kernel•org>,
Daniel Lezcano <daniel.lezcano@linaro•org>,
Eric Dumazet <edumazet@google•com>,
Geetha sowjanya <gakula@marvell•com>,
Ingo Molnar <mingo@kernel•org>, Jakub Kicinski <kuba@kernel•org>,
James Clark <james.clark@linaro•org>,
Jerin Jacob <jerinj@marvell•com>,
Linu Cherian <lcherian@marvell•com>,
Lukasz Luba <lukasz.luba@arm•com>,
Madhavan Srinivasan <maddy@linux•ibm.com>,
Michael Ellerman <mpe@ellerman•id.au>,
Mike Leach <mike.leach@linaro•org>,
Moritz Fischer <mdf@kernel•org>,
Nicholas Piggin <npiggin@gmail•com>,
Paolo Abeni <pabeni@redhat•com>,
Rasmus Villemoes <linux@rasmusvillemoes•dk>,
Simon Horman <horms@kernel•org>,
Stanislav Fomichev <sdf@fomichev•me>,
Subbaraya Sundeep <sbhatta@marvell•com>,
Sunil Goutham <sgoutham@marvell•com>,
Suzuki K Poulose <suzuki.poulose@arm•com>,
Tom Rix <trix@redhat•com>, Xu Yilun <yilun.xu@intel•com>,
Yajun Deng <yajun.deng@linux•dev>,
Yury Norov <yury.norov@gmail•com>,
Zhang Rui <rui.zhang@intel•com>, hariprasad <hkelam@marvell•com>,
coresight@lists•linaro.org, linux-arm-kernel@lists•infradead.org,
linux-fpga@vger•kernel.org, linux-pm@vger•kernel.org,
linuxppc-dev@lists•ozlabs.org, netdev@vger•kernel.org
Cc: Yury Norov <ynorov@nvidia•com>
Subject: [PATCH 04/12] lib/prime_numbers: drop temporary buffer in dump_primes()
Date: Thu, 19 Feb 2026 13:13:56 -0500 [thread overview]
Message-ID: <20260219181407.290201-5-ynorov@nvidia.com> (raw)
In-Reply-To: <20260219181407.290201-1-ynorov@nvidia.com>
The function uses temporary buffer to convert primes bitmap into
human readable format. Switch to using kunit_info("%*pbl")", and
drop the buffer.
Signed-off-by: Yury Norov <ynorov@nvidia•com>
---
lib/math/tests/prime_numbers_kunit.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/lib/math/tests/prime_numbers_kunit.c b/lib/math/tests/prime_numbers_kunit.c
index 2f1643208c66..55ac160c6dfa 100644
--- a/lib/math/tests/prime_numbers_kunit.c
+++ b/lib/math/tests/prime_numbers_kunit.c
@@ -8,12 +8,10 @@
static void dump_primes(void *ctx, const struct primes *p)
{
- static char buf[PAGE_SIZE];
struct kunit_suite *suite = ctx;
- bitmap_print_to_pagebuf(true, buf, p->primes, p->sz);
- kunit_info(suite, "primes.{last=%lu, .sz=%lu, .primes[]=...x%lx} = %s",
- p->last, p->sz, p->primes[BITS_TO_LONGS(p->sz) - 1], buf);
+ kunit_info(suite, "primes.{last=%lu, .sz=%lu, .primes[]=...x%lx} = %*pbl",
+ p->last, p->sz, p->primes[BITS_TO_LONGS(p->sz) - 1], (int)p->sz, p->primes);
}
static void prime_numbers_test(struct kunit *test)
--
2.43.0
next prev parent reply other threads:[~2026-02-19 21:25 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-19 18:13 [PATCH 00/12] cleanup bitmaps printing in sysfs Yury Norov
2026-02-19 18:13 ` [PATCH 01/12] powerpc/xive: simplify xive_spapr_debug_show() Yury Norov
2026-02-23 13:13 ` Shrikanth Hegde
2026-02-19 18:13 ` [PATCH 02/12] octeontx2-af: siplify rvu_debugfs Yury Norov
2026-02-19 18:13 ` [PATCH 03/12] thermal: intel: switch cpumask_get() to using cpumask_print_to_pagebuf() Yury Norov
2026-02-19 18:13 ` Yury Norov [this message]
2026-02-19 18:13 ` [PATCH 05/12] bitmap: switch test to scnprintf("%*pbl") Yury Norov
2026-02-19 18:13 ` [PATCH 06/12] bitmap: align test_bitmap output Yury Norov
2026-02-19 18:13 ` [PATCH 07/12] mm: add rest_of_page() macro Yury Norov
2026-02-19 18:14 ` [PATCH 08/12] coresight: don't use bitmap_print_to_pagebuf() Yury Norov
2026-02-19 18:42 ` Thomas Weißschuh
2026-02-19 18:14 ` [PATCH 09/12] fpga: m10bmc-sec: switch show_canceled_csk() to using scnprintf() Yury Norov
2026-02-19 23:43 ` Russ Weight
2026-02-26 7:39 ` Xu Yilun
2026-02-19 18:14 ` [PATCH 10/12] net-sysfs: switch xps_queue_show() " Yury Norov
2026-02-19 18:14 ` [PATCH 11/12] cpumask: switch cpumap_print_to_pagebuf() " Yury Norov
2026-02-19 18:14 ` [PATCH 12/12] bitmap: drop bitmap_print_to_pagebuf() Yury Norov
2026-02-19 19:41 ` [PATCH 00/12] cleanup bitmaps printing in sysfs Jakub Kicinski
2026-03-03 18:17 ` Yury Norov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260219181407.290201-5-ynorov@nvidia.com \
--to=ynorov@nvidia$(echo .)com \
--cc=akpm@linux-foundation$(echo .)org \
--cc=alexander.shishkin@linux$(echo .)intel.com \
--cc=andrew+netdev@lunn$(echo .)ch \
--cc=atenart@kernel$(echo .)org \
--cc=brauner@kernel$(echo .)org \
--cc=chleroy@kernel$(echo .)org \
--cc=coresight@lists$(echo .)linaro.org \
--cc=daniel.lezcano@linaro$(echo .)org \
--cc=davem@davemloft$(echo .)net \
--cc=edumazet@google$(echo .)com \
--cc=gakula@marvell$(echo .)com \
--cc=hkelam@marvell$(echo .)com \
--cc=horms@kernel$(echo .)org \
--cc=james.clark@linaro$(echo .)org \
--cc=jerinj@marvell$(echo .)com \
--cc=kuba@kernel$(echo .)org \
--cc=lcherian@marvell$(echo .)com \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
--cc=linux-fpga@vger$(echo .)kernel.org \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-pm@vger$(echo .)kernel.org \
--cc=linux@rasmusvillemoes$(echo .)dk \
--cc=linuxppc-dev@lists$(echo .)ozlabs.org \
--cc=lukasz.luba@arm$(echo .)com \
--cc=maddy@linux$(echo .)ibm.com \
--cc=mdf@kernel$(echo .)org \
--cc=mike.leach@linaro$(echo .)org \
--cc=mingo@kernel$(echo .)org \
--cc=mpe@ellerman$(echo .)id.au \
--cc=netdev@vger$(echo .)kernel.org \
--cc=npiggin@gmail$(echo .)com \
--cc=pabeni@redhat$(echo .)com \
--cc=peterz@infradead$(echo .)org \
--cc=rafael@kernel$(echo .)org \
--cc=rui.zhang@intel$(echo .)com \
--cc=sbhatta@marvell$(echo .)com \
--cc=sdf@fomichev$(echo .)me \
--cc=sgoutham@marvell$(echo .)com \
--cc=suzuki.poulose@arm$(echo .)com \
--cc=trix@redhat$(echo .)com \
--cc=yajun.deng@linux$(echo .)dev \
--cc=yilun.xu@intel$(echo .)com \
--cc=yury.norov@gmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox