summaryrefslogtreecommitdiff
path: root/src/mem/ruby
diff options
context:
space:
mode:
authorSteve Reinhardt <steve.reinhardt@amd.com>2016-02-06 17:21:20 -0800
committerSteve Reinhardt <steve.reinhardt@amd.com>2016-02-06 17:21:20 -0800
commitf6b828d068b046df17b462a4d05af957c038a3a8 (patch)
tree1f7be86e41467862c9377e3ca78fa661cc270aed /src/mem/ruby
parent2d91e741e8ffc8ae3d40f1e849db87e69af7bfa9 (diff)
downloadgem5-f6b828d068b046df17b462a4d05af957c038a3a8.tar.xz
style: eliminate explicit boolean comparisons
Result of running 'hg m5style --skip-all --fix-control -a' to get rid of '== true' comparisons, plus trivial manual edits to get rid of '== false'/'== False' comparisons. Left a couple of explicit comparisons in where they didn't seem unreasonable: invalid boolean comparison in src/arch/mips/interrupts.cc:155 >> DPRINTF(Interrupt, "Interrupts OnCpuTimerINterrupt(tc) == true\n");<< invalid boolean comparison in src/unittest/unittest.hh:110 >> "EXPECT_FALSE(" #expr ")", (expr) == false)<<
Diffstat (limited to 'src/mem/ruby')
-rw-r--r--src/mem/ruby/common/WriteMask.hh2
-rw-r--r--src/mem/ruby/network/garnet/fixed-pipeline/SWallocator_d.cc4
-rw-r--r--src/mem/ruby/system/GPUCoalescer.cc2
3 files changed, 4 insertions, 4 deletions
diff --git a/src/mem/ruby/common/WriteMask.hh b/src/mem/ruby/common/WriteMask.hh
index 2de02ef74..0ba69891a 100644
--- a/src/mem/ruby/common/WriteMask.hh
+++ b/src/mem/ruby/common/WriteMask.hh
@@ -71,7 +71,7 @@ class WriteMask
test(int offset)
{
assert(offset < mSize);
- return mMask[offset] == true;
+ return mMask[offset];
}
void
diff --git a/src/mem/ruby/network/garnet/fixed-pipeline/SWallocator_d.cc b/src/mem/ruby/network/garnet/fixed-pipeline/SWallocator_d.cc
index 06afee845..2387d2e8a 100644
--- a/src/mem/ruby/network/garnet/fixed-pipeline/SWallocator_d.cc
+++ b/src/mem/ruby/network/garnet/fixed-pipeline/SWallocator_d.cc
@@ -188,8 +188,8 @@ SWallocator_d::arbitrate_outports()
m_router->curCycle());
// This Input VC should now be empty
- assert(m_input_unit[inport]->isReady(invc,
- m_router->curCycle()) == false);
+ assert(!m_input_unit[inport]->
+ isReady(invc, m_router->curCycle()));
m_input_unit[inport]->set_vc_state(IDLE_, invc,
m_router->curCycle());
diff --git a/src/mem/ruby/system/GPUCoalescer.cc b/src/mem/ruby/system/GPUCoalescer.cc
index d4629a0b7..69f79187a 100644
--- a/src/mem/ruby/system/GPUCoalescer.cc
+++ b/src/mem/ruby/system/GPUCoalescer.cc
@@ -320,7 +320,7 @@ GPUCoalescer::insertRequest(PacketPtr pkt, RubyRequestType request_type)
assert(m_outstanding_count == total_outstanding);
// See if we should schedule a deadlock check
- if (deadlockCheckEvent.scheduled() == false) {
+ if (!deadlockCheckEvent.scheduled()) {
schedule(deadlockCheckEvent, m_deadlock_threshold + curTick());
}