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

Re: [Xen-devel] [PATCH v2] x86/mm: Clean up p2m_finish_type_change return value



Ping. Is this ok with you, George?

Regards,
Alex

On 17.01.2019 11:06, Alexandru Stefan ISAILA wrote:
> Changed the return value of 1 to 0 so now p2m_finish_type_change returns
> 0 for success or <0 for error.
> The “root” caller of p2m_finish_type_change() is
> XEN_DMOP_map_mem_type_to_ioreq_server and this does nothing useful with
> positive values.
> 
> Suggested-by: George Dunlap <george.dunlap@xxxxxxxxxxxxx>
> Signed-off-by: Alexandru Isaila <aisaila@xxxxxxxxxxxxxxx>
> 
> ---
> Changes since V1:
>       - Update commit message
>       - Move rc = 0 before out tag.
> ---
>   xen/arch/x86/mm/p2m.c | 11 +++--------
>   1 file changed, 3 insertions(+), 8 deletions(-)
> 
> diff --git a/xen/arch/x86/mm/p2m.c b/xen/arch/x86/mm/p2m.c
> index d14ce57dd5..a9c366bb5e 100644
> --- a/xen/arch/x86/mm/p2m.c
> +++ b/xen/arch/x86/mm/p2m.c
> @@ -1188,22 +1188,17 @@ int p2m_finish_type_change(struct domain *d,
>               if ( d->arch.altp2m_eptp[i] != mfn_x(INVALID_MFN) )
>               {
>                   struct p2m_domain *altp2m = d->arch.altp2m_p2m[i];
> -                int rc1;
>   
>                   p2m_lock(altp2m);
> -                rc1 = finish_type_change(altp2m, first_gfn, max_nr);
> +                rc = finish_type_change(altp2m, first_gfn, max_nr);
>                   p2m_unlock(altp2m);
>   
> -                if ( rc1 < 0 )
> -                {
> -                    rc = rc1;
> +                if ( rc < 0 )
>                       goto out;
> -                }
> -
> -                rc |= rc1;
>               }
>       }
>   #endif
> +    rc = 0;
>   
>    out:
>       p2m_unlock(hostp2m);
> 
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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