public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH RESEND 0/5] bitmap: cleanup bitmaps printing
@ 2026-03-03 20:08 Yury Norov
  2026-03-03 20:08 ` [PATCH 1/5] powerpc/xive: simplify xive_spapr_debug_show() Yury Norov
                   ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: Yury Norov @ 2026-03-03 20:08 UTC (permalink / raw)
  To: linux-kernel, Christophe Leroy (CS GROUP), Peter Zijlstra (Intel),
	Rafael J. Wysocki, Alexander Shishkin, Daniel Lezcano,
	Ingo Molnar, James Clark, Kees Cook, Lukasz Luba,
	Madhavan Srinivasan, Michael Ellerman, Mike Leach, Moritz Fischer,
	Nicholas Piggin, Russ Weight, Shrikanth Hegde, Suki K Poulose,
	Tom Rix, Thomas Weißschuh, Xu Yilun, Yury Norov, Zhang Rui,
	coresight, linux-arm-kernel, linux-fpga, linux-pm, linuxppc-dev
  Cc: Yury Norov, Jakub Kicinski

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


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2026-03-25  7:46 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-03 20:08 [PATCH RESEND 0/5] bitmap: cleanup bitmaps printing Yury Norov
2026-03-03 20:08 ` [PATCH 1/5] powerpc/xive: simplify xive_spapr_debug_show() Yury Norov
2026-03-03 20:08 ` [PATCH 2/5] thermal: intel: switch cpumask_get() to using cpumask_print_to_pagebuf() Yury Norov
2026-03-03 20:08 ` [PATCH 3/5] coresight: don't use bitmap_print_to_pagebuf() Yury Norov
2026-03-03 20:08 ` [PATCH 4/5] lib/prime_numbers: drop temporary buffer in dump_primes() Yury Norov
2026-03-03 20:08 ` [PATCH 5/5] fpga: m10bmc-sec: switch show_canceled_csk() to using sysfs_emit() Yury Norov
2026-03-24  9:15   ` Xu Yilun
2026-03-24 18:38     ` Yury Norov
2026-03-25  7:25       ` Xu Yilun
2026-03-19 20:18 ` [PATCH RESEND 0/5] bitmap: cleanup bitmaps printing Yury Norov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox