]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
NTB: ntb_transport: Use seq_file for QP stats debugfs
authorKoichiro Den <den@valinux.co.jp>
Wed, 7 Jan 2026 04:24:58 +0000 (13:24 +0900)
committerJon Mason <jdmason@kudzu.us>
Fri, 20 Feb 2026 22:31:55 +0000 (17:31 -0500)
commit8c1f92ca8bca3ce2d2c085571af89503bc7bc7c4
treea1c884e6cee606b88d656dfd7c1ddc8cc9e6502d
parent6a4b50585d74fe45d3ade1e3e86ba8aae79761a5
NTB: ntb_transport: Use seq_file for QP stats debugfs

The ./qp*/stats debugfs file for each NTB transport QP is currently
implemented with a hand-crafted kmalloc() buffer and a series of
scnprintf() calls. This is a pre-seq_file style pattern and makes future
extensions easy to truncate.

Convert the stats file to use the seq_file helpers via
DEFINE_SHOW_ATTRIBUTE(), which simplifies the code and lets the seq_file
core handle buffering and partial reads.

Reviewed-by: Frank Li <Frank.Li@nxp.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Koichiro Den <den@valinux.co.jp>
Signed-off-by: Jon Mason <jdmason@kudzu.us>
drivers/ntb/ntb_transport.c