public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Cc: Ingo Molnar <mingo@elte.hu>,
	"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] xen: cleanup for xen_pv_domain()/xen_hvm_domain()
Date: Mon, 30 Nov 2009 11:07:38 -0800	[thread overview]
Message-ID: <4B1417FA.3050206@goop.org> (raw)
In-Reply-To: <4B13637E.3040400@cn.fujitsu.com>

On 11/29/09 22:17, Xiao Guangrong wrote:
> Remove unnecessary judgment in xen_pv_domain() and xen_hvm_domain()
>   

I'd prefer not to change it.  These changes make no difference to the
generated code, and I see a small semantic difference between "is this a
Xen domain?" and "what kind of Xen domain is it?", as the latter on
really makes sense if it is in fact a Xen domain; the fact that
xen_domain() is also implemented in terms of xen_domain_type is just a
detail.

    J

> Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
> ---
>  arch/x86/include/asm/xen/hypervisor.h |    6 ++----
>  1 files changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/arch/x86/include/asm/xen/hypervisor.h b/arch/x86/include/asm/xen/hypervisor.h
> index d5b7e90..f94bd0a 100644
> --- a/arch/x86/include/asm/xen/hypervisor.h
> +++ b/arch/x86/include/asm/xen/hypervisor.h
> @@ -50,10 +50,8 @@ extern enum xen_domain_type xen_domain_type;
>  #endif
>  
>  #define xen_domain()		(xen_domain_type != XEN_NATIVE)
> -#define xen_pv_domain()		(xen_domain() &&			\
> -				 xen_domain_type == XEN_PV_DOMAIN)
> -#define xen_hvm_domain()	(xen_domain() &&			\
> -				 xen_domain_type == XEN_HVM_DOMAIN)
> +#define xen_pv_domain()		(xen_domain_type == XEN_PV_DOMAIN)
> +#define xen_hvm_domain()	(xen_domain_type == XEN_HVM_DOMAIN)
>  
>  #ifdef CONFIG_XEN_DOM0
>  #include <xen/interface/xen.h>
>   


      reply	other threads:[~2009-11-30 19:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-30  6:17 [PATCH] xen: cleanup for xen_pv_domain()/xen_hvm_domain() Xiao Guangrong
2009-11-30 19:07 ` Jeremy Fitzhardinge [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B1417FA.3050206@goop.org \
    --to=jeremy@goop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=xen-devel@lists.xensource.com \
    --cc=xiaoguangrong@cn.fujitsu.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox