[Spice-devel] [PATCH qxl-wddm-dod 2/8] Remove m_NumMemSlots member

Frediano Ziglio fziglio at redhat.com
Mon Apr 10 15:30:57 UTC 2017


Only used once

Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
---
 qxldod/QxlDod.cpp | 3 +--
 qxldod/QxlDod.h   | 1 -
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/qxldod/QxlDod.cpp b/qxldod/QxlDod.cpp
index 86d7f98..d29bce8 100755
--- a/qxldod/QxlDod.cpp
+++ b/qxldod/QxlDod.cpp
@@ -3534,11 +3534,10 @@ BOOL QxlDevice::InitMemSlots(void)
 {
     PAGED_CODE();
     DbgPrint(TRACE_LEVEL_VERBOSE, ("---> %s\n", __FUNCTION__));
-    m_NumMemSlots = m_RomHdr->slots_end;
     m_SlotGenBits = m_RomHdr->slot_gen_bits;
     m_SlotIdBits = m_RomHdr->slot_id_bits;
     m_VaSlotMask = (~(uint64_t)0) >> (m_SlotIdBits + m_SlotGenBits);
-    size_t size = m_NumMemSlots * sizeof(MemSlot);
+    size_t size = m_RomHdr->slots_end * sizeof(MemSlot);
     m_MemSlots = reinterpret_cast<MemSlot*>
                                 (new (PagedPool) BYTE[size]);
     if (m_MemSlots)
diff --git a/qxldod/QxlDod.h b/qxldod/QxlDod.h
index 1868069..9702314 100755
--- a/qxldod/QxlDod.h
+++ b/qxldod/QxlDod.h
@@ -637,7 +637,6 @@ private:
     ULONG m_RomSize;
 
     MemSlot *m_MemSlots;
-    UINT8 m_NumMemSlots;
     UINT8 m_MainMemSlot;
     UINT8 m_SurfaceMemSlot;
     UINT8 m_SlotIdBits;
-- 
2.9.3



More information about the Spice-devel mailing list