]> git.ipfire.org Git - thirdparty/linux.git/commit
cxl/test: Simplify fw_buf_checksum_show()
authorEric Biggers <ebiggers@kernel.org>
Mon, 30 Jun 2025 16:06:33 +0000 (09:06 -0700)
committerEric Biggers <ebiggers@kernel.org>
Fri, 4 Jul 2025 17:18:52 +0000 (10:18 -0700)
commit85de1929e17e71fafc51473ba1d14101e80180f5
treeb7b020bb78ec5f729bb473ff6154049930820373
parent1cf5cdf8d2ae3a55cc4890c02feb5da18e423e5d
cxl/test: Simplify fw_buf_checksum_show()

First, just use sha256() instead of a sequence of sha256_init(),
sha256_update(), and sha256_final().  The result is the same.

Second, use *phN instead of open-coding the conversion of bytes to hex.

Acked-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20250630160645.3198-3-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
tools/testing/cxl/test/mem.c