From: Boris Ostrovsky <boris.ostrovsky@oracle.com>
To: Juergen Gross <jgross@suse.com>,
linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org
Subject: Re: [PATCH] xen: cleanup xen.h
Date: Thu, 27 Jul 2017 11:37:09 -0400 [thread overview]
Message-ID: <95b842f3-aa02-ac05-6153-8f6a989fce15@oracle.com> (raw)
In-Reply-To: <20170727151158.1739-1-jgross@suse.com>
On 07/27/2017 11:11 AM, Juergen Gross wrote:
> The macros for testing domain types are more complicated then they
> need to. Simplify them.
>
> Signed-off-by: Juergen Gross <jgross@suse.com>
> ---
> include/xen/xen.h | 20 +++++++++-----------
> 1 file changed, 9 insertions(+), 11 deletions(-)
>
> diff --git a/include/xen/xen.h b/include/xen/xen.h
> index 6e8b7fc79801..28c59ca529d7 100644
> --- a/include/xen/xen.h
> +++ b/include/xen/xen.h
> @@ -13,11 +13,16 @@ extern enum xen_domain_type xen_domain_type;
> #define xen_domain_type XEN_NATIVE
> #endif
>
> +#ifdef CONFIG_XEN_PVH
> +extern bool xen_pvh;
> +#else
> +#define xen_pvh 0
> +#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)
Stray tab.
> +#define xen_hvm_domain() (xen_domain_type == XEN_HVM_DOMAIN)
> +#define xen_pvh_domain() (xen_pvh)
Not sure we need parentheses here.
Either way
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
>
> #ifdef CONFIG_XEN_DOM0
> #include <xen/interface/xen.h>
> @@ -29,11 +34,4 @@ extern enum xen_domain_type xen_domain_type;
> #define xen_initial_domain() (0)
> #endif /* CONFIG_XEN_DOM0 */
>
> -#ifdef CONFIG_XEN_PVH
> -extern bool xen_pvh;
> -#define xen_pvh_domain() (xen_hvm_domain() && xen_pvh)
> -#else
> -#define xen_pvh_domain() (0)
> -#endif
> -
> #endif /* _XEN_XEN_H */
next prev parent reply other threads:[~2017-07-27 15:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-27 15:11 Juergen Gross
2017-07-27 15:37 ` Boris Ostrovsky [this message]
2017-07-27 15:44 ` Juergen Gross
2017-08-16 14:56 ` Boris Ostrovsky
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=95b842f3-aa02-ac05-6153-8f6a989fce15@oracle.com \
--to=boris.ostrovsky@oracle.com \
--cc=jgross@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=xen-devel@lists.xenproject.org \
/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
all inboxes | Powered by JetHome®