diff options
author | Nischala Yelchuri <niyelchu@linux.microsoft.com> | 2023-06-20 21:40:38 +0300 |
---|---|---|
committer | Wei Liu <wei.liu@kernel.org> | 2023-06-28 20:53:25 +0300 |
commit | 55e544e1a922d272b62ec576a3de92329f838ce9 (patch) | |
tree | 82c8e08726a5bc79d9120af9d84a16cdbbb43d90 /drivers | |
parent | a6fe043880820981f6e4918240f967ea79bb063e (diff) | |
download | linux-55e544e1a922d272b62ec576a3de92329f838ce9.tar.xz |
x86/hyperv: Improve code for referencing hyperv_pcpu_input_arg
Several places in code for Hyper-V reference the
per-CPU variable hyperv_pcpu_input_arg. Older code uses a multi-line
sequence to reference the variable, and usually includes a cast.
Newer code does a much simpler direct assignment. The latter is
preferable as the complexity of the older code is unnecessary.
Update older code to use the simpler direct assignment.
Signed-off-by: Nischala Yelchuri <niyelchu@linux.microsoft.com>
Link: https://lore.kernel.org/r/1687286438-9421-1-git-send-email-niyelchu@linux.microsoft.com
Signed-off-by: Wei Liu <wei.liu@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/hv/hv_balloon.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hv/hv_balloon.c b/drivers/hv/hv_balloon.c index dffcc894f117..0d7a3ba66396 100644 --- a/drivers/hv/hv_balloon.c +++ b/drivers/hv/hv_balloon.c @@ -1628,7 +1628,7 @@ static int hv_free_page_report(struct page_reporting_dev_info *pr_dev_info, WARN_ON_ONCE(nents > HV_MEMORY_HINT_MAX_GPA_PAGE_RANGES); WARN_ON_ONCE(sgl->length < (HV_HYP_PAGE_SIZE << page_reporting_order)); local_irq_save(flags); - hint = *(struct hv_memory_hint **)this_cpu_ptr(hyperv_pcpu_input_arg); + hint = *this_cpu_ptr(hyperv_pcpu_input_arg); if (!hint) { local_irq_restore(flags); return -ENOSPC; |