mem-cache: Remove unnecessary cast in SectorTags::findVictim
authorNikos Nikoleris <nikos.nikoleris@arm.com>
Wed, 13 Jun 2018 14:48:29 +0000 (15:48 +0100)
committerNikos Nikoleris <nikos.nikoleris@arm.com>
Wed, 13 Jun 2018 17:54:52 +0000 (17:54 +0000)
Removes an uneccessary cast that also caused an unused variable
error (due to -Werror) when compiling .fast targets.

Change-Id: Ic043f462925e7eaa7b691455f1d9e08a1c101980
Reviewed-on: https://gem5-review.googlesource.com/11119
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>

src/mem/cache/tags/sector_tags.cc

index cec7bd41332a9063f190709705fdf00b8c43582e..33269ecc9e417f0b344c59e56c2f2167e319ed73 100644 (file)
@@ -278,7 +278,7 @@ SectorTags::findVictim(Addr addr, const bool is_secure,
     }
 
     // Get the location of the victim block within the sector
-    CacheBlk* victim = victim_sector->blks[extractSectorOffset(addr)];
+    SectorSubBlk* victim = victim_sector->blks[extractSectorOffset(addr)];
 
     // Get evicted blocks. Blocks are only evicted if the sectors mismatch and
     // the currently existing sector is valid.
@@ -294,10 +294,9 @@ SectorTags::findVictim(Addr addr, const bool is_secure,
         }
     }
 
-    SectorSubBlk* victim_cast = static_cast<SectorSubBlk*>(victim);
     DPRINTF(CacheRepl, "set %x, way %x, sector offset %x: %s\n",
             "selecting blk for replacement\n", victim->set, victim->way,
-            victim_cast->getSectorOffset());
+            victim->getSectorOffset());
 
     return victim;
 }