From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A0ACD24EA85; Tue, 20 May 2025 14:14:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747750488; cv=none; b=Ddu3qs8Vz2NF8raOIoPpVPomtrdRPWnvsZhuOMQPN5TG9pW/6As5D6LnuY91MzJ/lG7VaGJcQtNT3s+cZ177+2n/IMSh+9HvkO340lYRkaNlX0hp+w/nLNQUoV8ieVcK5dk8KdjEPtGISBg95Xu29NkhQar0LqK5ZGw2I4gKDI8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747750488; c=relaxed/simple; bh=BHiVDD0gyfynS9n9dDwioMpLB9gphRjd4RpSEVQyfEU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=QSCwqUpdOX0Xo4+sYtS9eyXrOLdxGVZQ4Hk6VH/IBWbCY0SFFZcOgbXkbgJj/ASVxJXl6Hl9l8y19H4AsZM2rGs3fv1J/BO4Rkhrw92SljCUZivJ/miS4HbjSuuRYSw8vAZj5DlpaJ/i6KLLkhZiwsgeaeOncrhrX//fd2vefhI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=rG86oIpn; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="rG86oIpn" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1F830C4CEE9; Tue, 20 May 2025 14:14:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1747750488; bh=BHiVDD0gyfynS9n9dDwioMpLB9gphRjd4RpSEVQyfEU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rG86oIpnH96nZkaReh9CG3PycV2Y7kRQJCl3mvNkablaIndyy6Kvsm5ybnRL82lSX bdzaANQYxJKCcJKw/e6uobMIzDrC+Q2az2MAIHOz0H7Q8jIrvnf43yY81EUTHFLczp xDTE1/NXe0W9Shq2poe02Pj+1w/V5N+BaAUO9UdU= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Geert Uytterhoeven , Mark Brown , Sasha Levin Subject: [PATCH 6.14 025/145] spi: loopback-test: Do not split 1024-byte hexdumps Date: Tue, 20 May 2025 15:49:55 +0200 Message-ID: <20250520125811.542022432@linuxfoundation.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250520125810.535475500@linuxfoundation.org> References: <20250520125810.535475500@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Geert Uytterhoeven [ 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 Link: https://patch.msgid.link/37ee1bc90c6554c9347040adabf04188c8f704aa.1746184171.git.geert+renesas@glider.be Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- drivers/spi/spi-loopback-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/spi-loopback-test.c b/drivers/spi/spi-loopback-test.c index 31a878d9458d9..7740f94847a88 100644 --- a/drivers/spi/spi-loopback-test.c +++ b/drivers/spi/spi-loopback-test.c @@ -420,7 +420,7 @@ MODULE_LICENSE("GPL"); static void spi_test_print_hex_dump(char *pre, const void *ptr, size_t len) { /* limit the hex_dump */ - if (len < 1024) { + if (len <= 1024) { print_hex_dump(KERN_INFO, pre, DUMP_PREFIX_OFFSET, 16, 1, ptr, len, 0); -- 2.39.5