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

Re: [Xen-devel] [PATCH 3 of 6] Make HAP log dirty disable return the correct rc



On Mon, Nov 14, 2011 at 9:48 PM, Andres Lagar-Cavilla
<andres@xxxxxxxxxxxxxxxx> wrote:
>  xen/arch/x86/mm/hap/hap.c |  1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
>
>
> Disabling log dirty mode in HAP always returns -EINVAL. Make it
> return the correct rc on success.
>
> Signed-off-by: Andres Lagar-Cavilla <andres@xxxxxxxxxxxxxxxx>
>
> diff -r 1ef55d87b459 -r 43dd4fdbf539 xen/arch/x86/mm/hap/hap.c
> --- a/xen/arch/x86/mm/hap/hap.c
> +++ b/xen/arch/x86/mm/hap/hap.c
> @@ -709,6 +709,7 @@ int hap_domctl(struct domain *d, xen_dom
>         return rc;
>     case XEN_DOMCTL_SHADOW_OP_GET_ALLOCATION:
>         sc->mb = hap_get_allocation(d);
> +    case XEN_DOMCTL_SHADOW_OP_OFF:
>         return 0;
>     default:
>         HAP_ERROR("Bad hap domctl op %u\n", sc->op);

I think you should always put "/* FALLTHRU */" when you're falling
through from one case statement to the next.  Or just "return 0" for
the case above and let the compiler optimize it.

 -George

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

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