mem: Remove unused variable
authorTommaso Marinelli <tommarin@ucm.es>
Thu, 3 Oct 2019 08:54:37 +0000 (10:54 +0200)
committerTommaso Marinelli <tommarin@ucm.es>
Thu, 3 Oct 2019 22:51:56 +0000 (22:51 +0000)
The variable *sys in dram_ctrl.cc was only used in an assert() check,
therefore it has been removed to allow building gem5.fast without
errors. A typo in a comment in abstract_mem.hh has also been corrected.

Change-Id: I2663545449ecfdb5a27c3574b79dd42beb4a49c8
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21380
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com>
Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>

src/mem/abstract_mem.hh
src/mem/dram_ctrl.cc

index 655fc01152c948c24c58c152ecfff8c8e1a8b6f6..d92e7070c2ff5b419d30d4490eb34434421c6382 100644 (file)
@@ -161,7 +161,7 @@ class AbstractMemory : public ClockedObject
         }
     }
 
-    /** Pointor to the System object.
+    /** Pointer to the System object.
      * This is used for getting the number of masters in the system which is
      * needed when registering stats
      */
index 1352dbfbe3e3490f24a42a3248c06eb9121240dc..37db27ce07974d0651923cca39d2c588716dd682 100644 (file)
@@ -2535,8 +2535,7 @@ DRAMCtrl::DRAMStats::regStats()
 {
     using namespace Stats;
 
-    System *sys = dram._system;
-    assert(sys);
+    assert(dram._system);
     const auto max_masters = dram._system->maxMasters();
 
     perBankRdBursts.init(dram.banksPerRank * dram.ranksPerChannel);