[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] xen/x86: Compress lines for immediate return



On Sun, Mar 29, 2020 at 11:46:08AM +0530, Simran Singhal wrote:
> diff --git a/xen/arch/x86/oprofile/op_model_athlon.c 
> b/xen/arch/x86/oprofile/op_model_athlon.c
> index 5c48f868ae..2bc0d04a1f 100644
> --- a/xen/arch/x86/oprofile/op_model_athlon.c
> +++ b/xen/arch/x86/oprofile/op_model_athlon.c
> @@ -343,9 +343,8 @@ static int athlon_check_ctrs(unsigned int const cpu,
>               }
>       }
>  
> -     ovf = handle_ibs(mode, regs);
>       /* See op_model_ppro.c */
> -     return ovf;
> +     return handle_ibs(mode, regs);

Hmm... ovf can potentially be set in the for loop before this hunk, but
then immediately get overwritten by the function call. I bet the ovf = 1
line is the reason why you didn't remove ovf out right.

I think you can perhaps just remove ovf here. It would make any
difference logically.

Other changes look correct to me.

Wei.



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.