]> git.ipfire.org Git - thirdparty/qemu.git/commit
hw/misc/aspeed_hace: Extract accumulation-mode hash execution into helper function
authorJamin Lin <jamin_lin@aspeedtech.com>
Thu, 15 May 2025 08:09:40 +0000 (16:09 +0800)
committerCédric Le Goater <clg@redhat.com>
Sun, 25 May 2025 21:39:11 +0000 (23:39 +0200)
commitb9ccbe212e2443294dd636cb17b4e436db8774a7
tree836f9e66b5e0beff3103a8680148185b32bd4b70
parent02c4c448460e1370f767c56749a1756a5c4dcc3a
hw/misc/aspeed_hace: Extract accumulation-mode hash execution into helper function

To improve code readability and maintainability of do_hash_operation(), this
commit introduces a new helper function: hash_execute_acc_mode().

This function encapsulates the full flow for accumulation mode, including
context initialization, update, conditional finalization, and digest writeback
with I/O vector unmapping.

No functional changes are introduced.

Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20250515081008.583578-9-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
hw/misc/aspeed_hace.c