public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] net: cleanup bitmaps printing
@ 2026-03-19 20:17 Yury Norov
  2026-03-19 20:17 ` [PATCH 1/2] octeontx2-af: simplify rvu_debugfs Yury Norov
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Yury Norov @ 2026-03-19 20:17 UTC (permalink / raw)
  To: To : Jakub Kicinski, Paolo Abeni, David S. Miller, Eric Dumazet,
	Andrew Lunn, Simon Horman, Sunil Goutham, Linu Cherian,
	Geetha sowjanya, Jerin Jacob, Subbaraya Sundeep,
	Stanislav Fomichev, Kuniyuki Iwashima, Christian Brauner,
	Yajun Deng, netdev, linux-kernel
  Cc: Yury Norov, Thomas Weißschuh, Yury Norov

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]".

v1: https://lore.kernel.org/all/20260219181407.290201-1-ynorov@nvidia.com/
v2:
 - fix copy-paste error in print_npa_qsize() (Simon);
 - fix typo in #1 subject (Jakub).

Yury Norov (2):
  octeontx2-af: siplify rvu_debugfs
  net-sysfs: switch xps_queue_show() to sysfs_emit()

 .../marvell/octeontx2/af/rvu_debugfs.c        | 28 ++++---------------
 net/core/net-sysfs.c                          |  2 +-
 2 files changed, 6 insertions(+), 24 deletions(-)

-- 
2.43.0


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

end of thread, other threads:[~2026-03-24 10:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-19 20:17 [PATCH v2 0/2] net: cleanup bitmaps printing Yury Norov
2026-03-19 20:17 ` [PATCH 1/2] octeontx2-af: simplify rvu_debugfs Yury Norov
2026-03-19 20:17 ` [PATCH 2/2] net-sysfs: switch xps_queue_show() to sysfs_emit() Yury Norov
2026-03-20 17:44 ` [PATCH v2 0/2] net: cleanup bitmaps printing Simon Horman
2026-03-24 10:20 ` patchwork-bot+netdevbpf

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