Re: [PATCH RESEND 0/5] bitmap: cleanup bitmaps printing

Madhavan Srinivasan
2026-04-02T05:42:26Z

On 4/2/26 6:27 AM, Yury Norov wrote:
> On Thu, Mar 19, 2026 at 04:18:40PM -0400, Yury Norov wrote:
>> Ping?
> OK, taking 1-4 in bitmap-for-next.

Acked-by: Madhavan Srinivasan <maddy@linux.ibm.com> for powerpc patch

>
> Thanks,
> Yury
>
>> 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/20260219181407.290201-1-ynorov@nvidia.com/
>>>
>>> The networking part, for reference:
>>>
>>> https://lore.kernel.org/all/20260303185507.111841-1-ynorov@nvidia.com/
>>>
>>> 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