]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
spi: loopback-test: Do not split 1024-byte hexdumps
authorGeert Uytterhoeven <geert+renesas@glider.be>
Fri, 2 May 2025 11:10:35 +0000 (13:10 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 22 May 2025 12:08:21 +0000 (14:08 +0200)
commit894b06a72bd61727569780674eb2698386ae57f7
tree9cf45d369af41cca7b7f2b58679ea400882a3fef
parent72f552e00c50f265896d3c19edc6696aa2910081
spi: loopback-test: Do not split 1024-byte hexdumps

[ Upstream commit a73fa3690a1f3014d6677e368dce4e70767a6ba2 ]

spi_test_print_hex_dump() prints buffers holding less than 1024 bytes in
full.  Larger buffers are truncated: only the first 512 and the last 512
bytes are printed, separated by a truncation message.  The latter is
confusing in case the buffer holds exactly 1024 bytes, as all data is
printed anyway.

Fix this by printing buffers holding up to and including 1024 bytes in
full.

Fixes: 84e0c4e5e2c4ef42 ("spi: add loopback test driver to allow for spi_master regression tests")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/37ee1bc90c6554c9347040adabf04188c8f704aa.1746184171.git.geert+renesas@glider.be
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/spi/spi-loopback-test.c