WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: Andres Lagar-Cavilla <andres@xxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH 3 of 6] Make HAP log dirty disable return the correct rc
From: George Dunlap <George.Dunlap@xxxxxxxxxxxxx>
Date: Tue, 15 Nov 2011 10:33:36 +0000
Cc: olaf@xxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxx, andres@xxxxxxxxxxxxxx, tim@xxxxxxx, keir.xen@xxxxxxxxx, adin@xxxxxxxxxxxxxx
Delivery-date: Tue, 15 Nov 2011 02:34:18 -0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=3iLEwYd+76nF0W8qqcMZU1AjkzOL7tsMmO4/DZXRdfA=; b=Y9Q+RaT5sQju3qNbtC/dRTY1pUrK4eyYrEOV3U2sx2VSaxlyQA+eBxV4Pl7hpjp1Ev Cc+iN2bCHTwetbQMF2YLpjNY4shKf0OJ5KIInMI0b2uFV9nr2zi3TCCTNXVCE4QJF75f +nR0P5t+UBkUPtgfbNU9d8reis0uqGnSaWPLE=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <43dd4fdbf53935a42568.1321307324@xxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <patchbomb.1321307321@xxxxxxxxxxxxxxxxxxx> <43dd4fdbf53935a42568.1321307324@xxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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