From: Juergen Gross <[email protected]> Sent: Wednesday, August 19, 2026 3:23 AM
> 
> After the conversion of rdmsrq() to an inline function some use cases
> can be simplified by dropping an intermediate variable.
> 
> Signed-off-by: Juergen Gross <[email protected]>
> ---
>  arch/x86/events/amd/core.c      |  6 +-----
>  arch/x86/events/amd/lbr.c       | 12 ++----------
>  arch/x86/events/intel/core.c    |  6 +-----
>  arch/x86/events/intel/cstate.c  |  5 +----
>  arch/x86/events/intel/knc.c     |  6 +-----
>  arch/x86/events/intel/lbr.c     | 17 +++--------------
>  arch/x86/events/intel/uncore.c  |  6 +-----
>  arch/x86/events/rapl.c          |  4 +---
>  arch/x86/events/zhaoxin/core.c  |  6 +-----
>  arch/x86/hyperv/hv_apic.c       |  5 +----
>  arch/x86/include/asm/apic.h     |  5 +----
>  arch/x86/include/asm/debugreg.h |  6 +-----
>  arch/x86/include/asm/kvm_host.h |  5 +----
>  13 files changed, 16 insertions(+), 73 deletions(-)
>

[snip]
 
> diff --git a/arch/x86/hyperv/hv_apic.c b/arch/x86/hyperv/hv_apic.c
> index 4e30f9a11bc4..52ee8c237c2c 100644
> --- a/arch/x86/hyperv/hv_apic.c
> +++ b/arch/x86/hyperv/hv_apic.c
> @@ -36,10 +36,7 @@ static struct apic orig_apic;
> 
>  static u64 hv_apic_icr_read(void)
>  {
> -     u64 reg_val;
> -
> -     reg_val = rdmsrq(HV_X64_MSR_ICR);
> -     return reg_val;
> +     return rdmsrq(HV_X64_MSR_ICR);
>  }
> 

For this Hyper-V specific code,

Reviewed-by: Michael Kelley <[email protected]>

Reply via email to