changeset 7ee2e35da276 in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=7ee2e35da276
description:
        ns_gige: Fix a missing curly brace in if-statement

        This patch adds a missing curly brace when clearing and setting the
        appropriate bits in the ns_gige.cc code.

        This commit is not based on any runtime bug experienced, but rather
        inspection of the code.

diffstat:

 src/dev/ns_gige.cc |  20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diffs (30 lines):

diff -r 73116cbeacba -r 7ee2e35da276 src/dev/ns_gige.cc
--- a/src/dev/ns_gige.cc        Thu Jan 26 16:44:43 2012 -0500
+++ b/src/dev/ns_gige.cc        Fri Jan 27 12:54:11 2012 -0500
@@ -465,16 +465,16 @@
                 reg & CFGR_DUPSTS ||
                 reg & CFGR_RESERVED ||
                 reg & CFGR_T64ADDR ||
-                reg & CFGR_PCI64_DET)
-
-            // First clear all writable bits
-            regs.config &= CFGR_LNKSTS | CFGR_SPDSTS | CFGR_DUPSTS |
-                                   CFGR_RESERVED | CFGR_T64ADDR |
-                                   CFGR_PCI64_DET;
-            // Now set the appropriate writable bits
-            regs.config |= reg & ~(CFGR_LNKSTS | CFGR_SPDSTS | CFGR_DUPSTS |
-                                   CFGR_RESERVED | CFGR_T64ADDR |
-                                   CFGR_PCI64_DET);
+                reg & CFGR_PCI64_DET) {
+                // First clear all writable bits
+                regs.config &= CFGR_LNKSTS | CFGR_SPDSTS | CFGR_DUPSTS |
+                    CFGR_RESERVED | CFGR_T64ADDR |
+                    CFGR_PCI64_DET;
+                // Now set the appropriate writable bits
+                regs.config |= reg & ~(CFGR_LNKSTS | CFGR_SPDSTS | CFGR_DUPSTS 
|
+                                       CFGR_RESERVED | CFGR_T64ADDR |
+                                       CFGR_PCI64_DET);
+            }
 
 // all these #if 0's are because i don't THINK the kernel needs to
 // have these implemented. if there is a problem relating to one of
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to