xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@citrix.com>
To: xen-devel@lists.xenproject.org
Cc: Julien Grall <julien.grall@citrix.com>, Tim Deegan <tim@xen.org>,
	Keir Fraser <keir@xen.org>,
	Ian Campbell <ian.campbell@citrix.com>,
	Jan Beulich <jbeulich@suse.com>
Subject: [PATCH 4/6] xen/common: memory: Avoid to shadow the variable "d" in do_memory_op
Date: Tue, 27 Oct 2015 15:39:17 +0000	[thread overview]
Message-ID: <1445960359-17217-5-git-send-email-julien.grall@citrix.com> (raw)
In-Reply-To: <1445960359-17217-1-git-send-email-julien.grall@citrix.com>

The variable "d" is declared multiple times within do_memory_op.

The subsequent declaration are not useful because the top one is never
used. So drop them.

Signed-off-by: Julien Grall <julien.grall@citrix.com>

---

Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Jan Beulich <jbeulich@suse.com>
Cc: Keir Fraser <keir@xen.org>
Cc: Tim Deegan <tim@xen.org>
---
 xen/common/memory.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/xen/common/memory.c b/xen/common/memory.c
index 23f90c6..a3bffb7 100644
--- a/xen/common/memory.c
+++ b/xen/common/memory.c
@@ -961,7 +961,6 @@ long do_memory_op(unsigned long cmd, XEN_GUEST_HANDLE_PARAM(void) arg)
     case XENMEM_add_to_physmap_batch:
     {
         struct xen_add_to_physmap_batch xatpb;
-        struct domain *d;
 
         BUILD_BUG_ON((typeof(xatpb.size))-1 >
                      (UINT_MAX >> MEMOP_EXTENT_SHIFT));
@@ -1007,7 +1006,6 @@ long do_memory_op(unsigned long cmd, XEN_GUEST_HANDLE_PARAM(void) arg)
     {
         struct xen_remove_from_physmap xrfp;
         struct page_info *page;
-        struct domain *d;
 
         if ( unlikely(start_extent) )
             return -ENOSYS;
@@ -1076,7 +1074,6 @@ long do_memory_op(unsigned long cmd, XEN_GUEST_HANDLE_PARAM(void) arg)
     case XENMEM_get_vnumainfo:
     {
         struct xen_vnuma_topology_info topology;
-        struct domain *d;
         unsigned int dom_vnodes, dom_vranges, dom_vcpus;
         struct vnuma_info tmp;
 
-- 
2.1.4

  parent reply	other threads:[~2015-10-27 15:40 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-27 15:39 [PATCH 0/6] Remove some usage of shadow variable Julien Grall
2015-10-27 15:39 ` [PATCH 1/6] xen/arm: domain_build: Avoid to shadow the variable "mod" in write_properties Julien Grall
2015-11-03 17:01   ` Ian Campbell
2015-10-27 15:39 ` [PATCH 2/6] xen/common: domain: Avoid to shadow the variable "d" in do_vcpu_op Julien Grall
2015-10-27 15:39 ` [PATCH 3/6] xen/common: grant_table: Avoid to shadow "frame" in __gnttab_map_grant_ref Julien Grall
2015-10-27 16:22   ` Jan Beulich
2015-10-27 15:39 ` Julien Grall [this message]
2015-10-27 16:25   ` [PATCH 4/6] xen/common: memory: Avoid to shadow the variable "d" in do_memory_op Jan Beulich
2015-10-27 16:51     ` Julien Grall
2015-10-27 15:39 ` [PATCH 5/6] xen/common: sched: Avoid to shadow the variable "cur" in runq_tickle Julien Grall
2015-10-27 15:59   ` Dario Faggioli
2015-10-27 16:27   ` Jan Beulich
2015-10-27 17:00     ` Julien Grall
2015-10-27 15:39 ` [PATCH 6/6] xen/common: sched-rt: Avoid to shadow the variable "svc" in rt_dom_cntl Julien Grall
2015-10-27 16:17   ` Dario Faggioli
2015-10-27 16:03 ` [PATCH 0/6] Remove some usage of shadow variable Jan Beulich
2015-10-27 17:41   ` George Dunlap
2015-10-28  8:53     ` Jan Beulich
2015-10-28  9:10       ` Julien Grall
2015-10-28  9:27         ` Jan Beulich
2015-10-28  9:12       ` Juergen Gross
2015-10-28  9:31         ` Jan Beulich
2015-10-28  9:44           ` Juergen Gross
2015-10-28 10:50       ` George Dunlap
2015-10-28 11:50         ` Jan Beulich
2015-10-27 16:12 ` Andrew Cooper
2015-10-27 17:39   ` 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=1445960359-17217-5-git-send-email-julien.grall@citrix.com \
    --to=julien.grall@citrix.com \
    --cc=ian.campbell@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=keir@xen.org \
    --cc=tim@xen.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;
as well as URLs for NNTP newsgroup(s).