From: George Dunlap <george.dunlap@citrix.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>,
Xen-devel <xen-devel@lists.xen.org>
Cc: George Dunlap <george.dunlap@eu.citrix.com>,
Tim Deegan <tim@xen.org>, Jan Beulich <JBeulich@suse.com>
Subject: Re: [PATCH] x86/p2m: Reposition p2m_teardown_nestedp2m() to avoid its forward declaration
Date: Wed, 8 Feb 2017 18:21:12 +0000 [thread overview]
Message-ID: <80bd546c-71da-c9fa-0292-6802de65e42e@citrix.com> (raw)
In-Reply-To: <1486493008-2455-1-git-send-email-andrew.cooper3@citrix.com>
On 07/02/17 18:43, Andrew Cooper wrote:
> While adjusting these functions, use unsigned int rather than uint8_t for the
> loop variable, and fix the whitespace style.
>
> No functional change.
I think changing a variable from 8 to 64 bits might count as a
functional change; but anyway:
Reviewed-by: George Dunlap <george.dunlap@citrix.com>
>
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
> ---
> CC: Jan Beulich <JBeulich@suse.com>
> CC: Tim Deegan <tim@xen.org>
> CC: George Dunlap <george.dunlap@eu.citrix.com>
> ---
> xen/arch/x86/mm/p2m.c | 36 +++++++++++++++++-------------------
> 1 file changed, 17 insertions(+), 19 deletions(-)
>
> diff --git a/xen/arch/x86/mm/p2m.c b/xen/arch/x86/mm/p2m.c
> index 6548e9f..7675e9c 100644
> --- a/xen/arch/x86/mm/p2m.c
> +++ b/xen/arch/x86/mm/p2m.c
> @@ -147,15 +147,29 @@ static void p2m_teardown_hostp2m(struct domain *d)
> }
> }
>
> -static void p2m_teardown_nestedp2m(struct domain *d);
> +static void p2m_teardown_nestedp2m(struct domain *d)
> +{
> + unsigned int i;
> + struct p2m_domain *p2m;
> +
> + for ( i = 0; i < MAX_NESTEDP2M; i++ )
> + {
> + if ( !d->arch.nested_p2m[i] )
> + continue;
> + p2m = d->arch.nested_p2m[i];
> + list_del(&p2m->np2m_list);
> + p2m_free_one(p2m);
> + d->arch.nested_p2m[i] = NULL;
> + }
> +}
>
> static int p2m_init_nestedp2m(struct domain *d)
> {
> - uint8_t i;
> + unsigned int i;
> struct p2m_domain *p2m;
>
> mm_lock_init(&d->arch.nested_p2m_lock);
> - for (i = 0; i < MAX_NESTEDP2M; i++)
> + for ( i = 0; i < MAX_NESTEDP2M; i++ )
> {
> d->arch.nested_p2m[i] = p2m = p2m_init_one(d);
> if ( p2m == NULL )
> @@ -171,22 +185,6 @@ static int p2m_init_nestedp2m(struct domain *d)
> return 0;
> }
>
> -static void p2m_teardown_nestedp2m(struct domain *d)
> -{
> - uint8_t i;
> - struct p2m_domain *p2m;
> -
> - for (i = 0; i < MAX_NESTEDP2M; i++)
> - {
> - if ( !d->arch.nested_p2m[i] )
> - continue;
> - p2m = d->arch.nested_p2m[i];
> - list_del(&p2m->np2m_list);
> - p2m_free_one(p2m);
> - d->arch.nested_p2m[i] = NULL;
> - }
> -}
> -
> static void p2m_teardown_altp2m(struct domain *d)
> {
> unsigned int i;
>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
prev parent reply other threads:[~2017-02-08 18:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-07 18:43 [PATCH] x86/p2m: Reposition p2m_teardown_nestedp2m() to avoid its forward declaration Andrew Cooper
2017-02-08 13:31 ` Jan Beulich
2017-02-08 18:21 ` George Dunlap [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=80bd546c-71da-c9fa-0292-6802de65e42e@citrix.com \
--to=george.dunlap@citrix.com \
--cc=JBeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=george.dunlap@eu.citrix.com \
--cc=tim@xen.org \
--cc=xen-devel@lists.xen.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;
as well as URLs for NNTP newsgroup(s).