mshv: Introduce hv_result_needs_memory() helper function
authorStanislav Kinsburskii <skinsburskii@linux.microsoft.com>
Thu, 5 Feb 2026 18:42:10 +0000 (18:42 +0000)
committerWei Liu <wei.liu@kernel.org>
Thu, 19 Feb 2026 06:36:58 +0000 (06:36 +0000)
commit7db44aa173de03c170d4dfa5864ae126678a5ad5
tree3cd94ce3bf1943baefe2cc99c4197aebd59cbc4f
parent8927a108a7662eb83eb667bc0c5a0633397122b1
mshv: Introduce hv_result_needs_memory() helper function

Replace direct comparisons of hv_result(status) against
HV_STATUS_INSUFFICIENT_MEMORY with a new hv_result_needs_memory() helper
function.

This improves code readability and provides a consistent and extendable
interface for checking out-of-memory conditions in hypercall results.

No functional changes intended.

Signed-off-by: Stanislav Kinsburskii <skinsburskii@linux.microsoft.com>
Reviewed-by: Anirudh Rayabharam (Microsoft) <anirudh@anirudhrb.com>
Reviewed-by: Mukesh R <mrathor@linux.microsoft.com>
Signed-off-by: Wei Liu <wei.liu@kernel.org>
drivers/hv/hv_proc.c
drivers/hv/mshv_root_hv_call.c
drivers/hv/mshv_root_main.c
include/asm-generic/mshyperv.h