Re: [PATCH RESEND 0/5] bitmap: cleanup bitmaps printing
Yury Norov <[email protected]> Thu, 19 Mar 2026 16:18:40 -0400
| Newsgroups | org.kernel.vger.linux-fpga,org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-kernel,org.kernel.vger.linux-pm,org.ozlabs.lists.linuxppc-dev |
|---|---|
| Message-ID | <abxaIMi55N4X9JWz@yury> |
Ping? On Tue, Mar 03, 2026 at 03:08:36PM -0500, Yury Norov wrote: > Bitmap API has a bitmap_print_to_pagebuf() function that is intended to > print bitmap into a human readable format, making sure that the output > string will not get big enough to cross the current page limit. > > Some drivers use this function immediately before passing the result to > scnprintf() with no modification. This is useless because scnprintf(), > and helpers based on it like seq_pritf() and sysfs_emit(), take care of > not overflowing the buffer by itself, and perfectly print bitmaps with > "%*pb[l]". > > This is a resend of non-networking part of [1]. Patches #3,5 switch from > plain scnprintf() to sysfs_emit(), as pointed out by Thomas WeiÃschuh. > > [1] https://lore.kernel.org/all/[email protected]/ > > The networking part, for reference: > > https://lore.kernel.org/all/[email protected]/ > > Each patch can be applied individually per corresponding subsystem. > > Yury Norov (5): > powerpc/xive: simplify xive_spapr_debug_show() > thermal: intel: switch cpumask_get() to using > cpumask_print_to_pagebuf() > coresight: don't use bitmap_print_to_pagebuf() > lib/prime_numbers: drop temporary buffer in dump_primes() > fpga: m10bmc-sec: switch show_canceled_csk() to using sysfs_emit() > > arch/powerpc/sysdev/xive/spapr.c | 12 ++----- > drivers/fpga/intel-m10-bmc-sec-update.c | 3 +- > .../hwtracing/coresight/coresight-cti-sysfs.c | 32 ++++++++----------- > drivers/thermal/intel/intel_powerclamp.c | 3 +- > lib/math/tests/prime_numbers_kunit.c | 6 ++-- > 5 files changed, 21 insertions(+), 35 deletions(-) > > -- > 2.43.0