diff options
| author | Stanislav Kinsburskii <skinsburskii@linux.microsoft.com> | 2026-02-05 18:42:10 +0000 |
|---|---|---|
| committer | Wei Liu <wei.liu@kernel.org> | 2026-02-19 06:36:58 +0000 |
| commit | 7db44aa173de03c170d4dfa5864ae126678a5ad5 (patch) | |
| tree | 3cd94ce3bf1943baefe2cc99c4197aebd59cbc4f /drivers/hv/mshv_root_main.c | |
| parent | 8927a108a7662eb83eb667bc0c5a0633397122b1 (diff) | |
| download | linux-next-7db44aa173de03c170d4dfa5864ae126678a5ad5.tar.gz linux-next-7db44aa173de03c170d4dfa5864ae126678a5ad5.zip | |
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>
Diffstat (limited to 'drivers/hv/mshv_root_main.c')
| -rw-r--r-- | drivers/hv/mshv_root_main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hv/mshv_root_main.c b/drivers/hv/mshv_root_main.c index 192467a25f66..17546f6f4e85 100644 --- a/drivers/hv/mshv_root_main.c +++ b/drivers/hv/mshv_root_main.c @@ -252,7 +252,7 @@ static int mshv_ioctl_passthru_hvcall(struct mshv_partition *partition, if (hv_result_success(status)) break; - if (hv_result(status) != HV_STATUS_INSUFFICIENT_MEMORY) + if (!hv_result_needs_memory(status)) ret = hv_result_to_errno(status); else ret = hv_call_deposit_pages(NUMA_NO_NODE, |
