WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH 1 of 5] The map_count field of struct grant_table is

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH 1 of 5] The map_count field of struct grant_table is only written to and never read
From: <steven.smith@xxxxxxxxxxxxx>
Date: Tue, 19 May 2009 12:27:03 +0100
Delivery-date: Tue, 19 May 2009 04:23:46 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1242732422@xxxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Steven Smith <steven.smith@xxxxxxxxxxxxx>
# Date 1242731493 -3600
# Node ID 1954d5a3a1f5977b6d22c545cdc352bad27af528
# Parent  20b69e03fbd099226652fb9ba1540d5e93f35438
The map_count field of struct grant_table is only written to and never read.
That makes it a bit useless.  Kill it.

Signed-off-by: Steven Smith <steven.smith@xxxxxxxxxxxxx>

diff -r 20b69e03fbd0 -r 1954d5a3a1f5 xen/common/grant_table.c
--- a/xen/common/grant_table.c  Tue May 19 12:11:33 2009 +0100
+++ b/xen/common/grant_table.c  Tue May 19 12:11:33 2009 +0100
@@ -119,7 +119,6 @@
     if ( unlikely((h = t->maptrack_head) == (t->maptrack_limit - 1)) )
         return -1;
     t->maptrack_head = maptrack_entry(t, h).ref;
-    t->map_count++;
     return h;
 }
 
@@ -129,7 +128,6 @@
 {
     maptrack_entry(t, handle).ref = t->maptrack_head;
     t->maptrack_head = handle;
-    t->map_count--;
 }
 
 static inline int
diff -r 20b69e03fbd0 -r 1954d5a3a1f5 xen/include/xen/grant_table.h
--- a/xen/include/xen/grant_table.h     Tue May 19 12:11:33 2009 +0100
+++ b/xen/include/xen/grant_table.h     Tue May 19 12:11:33 2009 +0100
@@ -91,7 +91,6 @@
     struct grant_mapping **maptrack;
     unsigned int          maptrack_head;
     unsigned int          maptrack_limit;
-    unsigned int          map_count;
     /* Lock protecting updates to active and shared grant tables. */
     spinlock_t            lock;
 };
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel