Author: zbao
Date: Tue Apr 19 08:40:56 2011
New Revision: 6517
URL: https://tracker.coreboot.org/trac/coreboot/changeset/6517

Log:
The "temp" will be used later. So it has to be calculated correctly.

Comment by Peter,
The variable name "temp" unfortunately does not explain what the value
is. The commit message also does not have hints. Hopefully in the
future it's possible to also use a brief moment to improve the clarity
of the code, while it is already being fixed for some other
reason. Ie. fixing up variable names, writing particularly informative
commit messages, or of course both at the same time! :)

Signed-off-by: Zheng Bao <[email protected]>
Acked-by: Marc Jones <[email protected]>

Modified:
   trunk/src/northbridge/amd/amdht/h3ncmn.c

Modified: trunk/src/northbridge/amd/amdht/h3ncmn.c
==============================================================================
--- trunk/src/northbridge/amd/amdht/h3ncmn.c    Tue Apr 19 03:36:24 2011        
(r6516)
+++ trunk/src/northbridge/amd/amdht/h3ncmn.c    Tue Apr 19 08:40:56 2011        
(r6517)
@@ -565,7 +565,8 @@
 
        /* bits[15,13,12] specify the cores */
        /* Support Downcoring */
-       cores = ((temp & 8) >> 1) + (temp & 3) + 1;
+       temp = ((temp & 8) >> 1) + (temp & 3);
+       cores = temp + 1;
        AmdPCIReadBits (MAKE_SBDFO(makePCISegmentFromNode(node),
                                        makePCIBusFromNode(node),
                                        makePCIDeviceFromNode(node),

-- 
coreboot mailing list: [email protected]
http://www.coreboot.org/mailman/listinfo/coreboot

Reply via email to