All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: xen-devel <xen-devel@lists.xenproject.org>
Cc: George Dunlap <George.Dunlap@eu.citrix.com>
Subject: [PATCH] x86/PoD: drop a pointless local variable
Date: Wed, 31 May 2017 01:52:37 -0600	[thread overview]
Message-ID: <592E9265020000780015E085@prv-mh.provo.novell.com> (raw)
In-Reply-To: 592E9265020000780015E085@prv-mh.provo.novell.com

[-- Attachment #1: Type: text/plain, Size: 923 bytes --]

... and move another one into a more narrow scope.

Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/xen/arch/x86/mm/p2m-pod.c
+++ b/xen/arch/x86/mm/p2m-pod.c
@@ -1180,8 +1180,6 @@ guest_physmap_mark_populate_on_demand(st
 {
     struct p2m_domain *p2m = p2m_get_hostp2m(d);
     unsigned long i, n, pod_count = 0;
-    p2m_type_t ot;
-    mfn_t omfn;
     int rc = 0;
 
     if ( !paging_mode_translate(d) )
@@ -1194,10 +1192,11 @@ guest_physmap_mark_populate_on_demand(st
     /* Make sure all gpfns are unused */
     for ( i = 0; i < (1UL << order); i += n )
     {
+        p2m_type_t ot;
         p2m_access_t a;
         unsigned int cur_order;
 
-        omfn = p2m->get_entry(p2m, gfn + i, &ot, &a, 0, &cur_order, NULL);
+        p2m->get_entry(p2m, gfn + i, &ot, &a, 0, &cur_order, NULL);
         n = 1UL << min(order, cur_order);
         if ( p2m_is_ram(ot) )
         {




[-- Attachment #2: x86-PoD-drop-variable.patch --]
[-- Type: text/plain, Size: 961 bytes --]

x86/PoD: drop a pointless local variable

... and move another one into a more narrow scope.

Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/xen/arch/x86/mm/p2m-pod.c
+++ b/xen/arch/x86/mm/p2m-pod.c
@@ -1180,8 +1180,6 @@ guest_physmap_mark_populate_on_demand(st
 {
     struct p2m_domain *p2m = p2m_get_hostp2m(d);
     unsigned long i, n, pod_count = 0;
-    p2m_type_t ot;
-    mfn_t omfn;
     int rc = 0;
 
     if ( !paging_mode_translate(d) )
@@ -1194,10 +1192,11 @@ guest_physmap_mark_populate_on_demand(st
     /* Make sure all gpfns are unused */
     for ( i = 0; i < (1UL << order); i += n )
     {
+        p2m_type_t ot;
         p2m_access_t a;
         unsigned int cur_order;
 
-        omfn = p2m->get_entry(p2m, gfn + i, &ot, &a, 0, &cur_order, NULL);
+        p2m->get_entry(p2m, gfn + i, &ot, &a, 0, &cur_order, NULL);
         n = 1UL << min(order, cur_order);
         if ( p2m_is_ram(ot) )
         {

[-- Attachment #3: Type: text/plain, Size: 127 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

       reply	other threads:[~2017-05-31  7:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-31  7:52 Jan Beulich [this message]
2017-06-05  9:53 ` [PATCH] x86/PoD: drop a pointless local variable George Dunlap

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=592E9265020000780015E085@prv-mh.provo.novell.com \
    --to=jbeulich@suse.com \
    --cc=George.Dunlap@eu.citrix.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.