diff options
author | Andreas Hansson <andreas.hansson@arm.com> | 2016-01-11 05:52:20 -0500 |
---|---|---|
committer | Andreas Hansson <andreas.hansson@arm.com> | 2016-01-11 05:52:20 -0500 |
commit | 12eb0343784f52994110df7e7fce4a0b639a6ec3 (patch) | |
tree | 12ff1c51b8051bb7e7d889eed499bee0dcd4cd1e /src/mem/ruby/structures | |
parent | 7661f1c2bf2b45603264076fabce2eb42373cd18 (diff) | |
download | gem5-12eb0343784f52994110df7e7fce4a0b639a6ec3.tar.xz |
scons: Enable -Wextra by default
Make best use of the compiler, and enable -Wextra as well as
-Wall. There are a few issues that had to be resolved, but they are
all trivial.
Diffstat (limited to 'src/mem/ruby/structures')
-rw-r--r-- | src/mem/ruby/structures/RubyMemoryControl.cc | 10 | ||||
-rw-r--r-- | src/mem/ruby/structures/RubyMemoryControl.hh | 10 |
2 files changed, 10 insertions, 10 deletions
diff --git a/src/mem/ruby/structures/RubyMemoryControl.cc b/src/mem/ruby/structures/RubyMemoryControl.cc index 5feb9348b..77f1c239f 100644 --- a/src/mem/ruby/structures/RubyMemoryControl.cc +++ b/src/mem/ruby/structures/RubyMemoryControl.cc @@ -342,7 +342,7 @@ RubyMemoryControl::enqueueToDirectory(MemoryNode *req, Cycles latency) // getBank returns an integer that is unique for each // bank across this memory controller. -const int +int RubyMemoryControl::getBank(const Addr addr) const { int dimm = (addr >> m_dimm_bit_0) & (m_dimms_per_channel - 1); @@ -353,7 +353,7 @@ RubyMemoryControl::getBank(const Addr addr) const + bank; } -const int +int RubyMemoryControl::getRank(const Addr addr) const { int bank = getBank(addr); @@ -364,7 +364,7 @@ RubyMemoryControl::getRank(const Addr addr) const // getRank returns an integer that is unique for each rank // and independent of individual bank. -const int +int RubyMemoryControl::getRank(int bank) const { int rank = (bank / m_banks_per_rank); @@ -373,7 +373,7 @@ RubyMemoryControl::getRank(int bank) const } // Not used! -const int +int RubyMemoryControl::getChannel(const Addr addr) const { assert(false); @@ -381,7 +381,7 @@ RubyMemoryControl::getChannel(const Addr addr) const } // Not used! -const int +int RubyMemoryControl::getRow(const Addr addr) const { assert(false); diff --git a/src/mem/ruby/structures/RubyMemoryControl.hh b/src/mem/ruby/structures/RubyMemoryControl.hh index cd777f5e7..601c4d1a2 100644 --- a/src/mem/ruby/structures/RubyMemoryControl.hh +++ b/src/mem/ruby/structures/RubyMemoryControl.hh @@ -75,12 +75,12 @@ class RubyMemoryControl : public AbstractMemory, public Consumer void print(std::ostream& out) const override; void regStats() override; - const int getBank(const Addr addr) const; - const int getRank(const Addr addr) const; + int getBank(const Addr addr) const; + int getRank(const Addr addr) const; // not used in Ruby memory controller - const int getChannel(const Addr addr) const; - const int getRow(const Addr addr) const; + int getChannel(const Addr addr) const; + int getRow(const Addr addr) const; //added by SS int getBanksPerRank() { return m_banks_per_rank; }; @@ -92,7 +92,7 @@ class RubyMemoryControl : public AbstractMemory, public Consumer private: void enqueueToDirectory(MemoryNode *req, Cycles latency); - const int getRank(int bank) const; + int getRank(int bank) const; bool queueReady(int bank); void issueRequest(int bank); bool issueRefresh(int bank); |