Patchwork small fix in mct_ddr3: missing brackets in if

login
register
about
Submitter xdrudis
Date 2010-09-27 20:56:59
Message ID <20100927205659.GA4358@ideafix.casa.ct>
Download mbox | patch
Permalink /patch/1995/
State Accepted
Headers show

Comments

xdrudis - 2010-09-27 20:56:59
Hello.

While trying the latest svn code I've seen curious results. It mostly
works better than before but still hangs at various places (it seems
random which one of the places reaches at each boot attempt). Since
I haven't finished fixes in fidvid.c it may well be that. But if 
I turn on post to serial port it seems to always hang at memory training.
I'll disregard all that atcontinue with fidvid fornow

In any case, I've come across this code that looks wrong.
This patch makes no difference for me at runtime, but I still 
feel it must fix something. I'm not sure whether the hardcoded 8 for the 
number of nodes in pDCTstat is correct. I think it might have more 
elements, but maybe it's enough to deal with the first 8 for some 
reason ? 

Signed-of-by: Xavi Drudis Ferran <xdrudis@tinet.cat>
Stefan Reinauer - 2010-09-27 21:09:06
On 9/27/10 10:56 PM, xdrudis wrote:
> Hello.
>
> While trying the latest svn code I've seen curious results. It mostly
> works better than before but still hangs at various places (it seems
> random which one of the places reaches at each boot attempt). Since
> I haven't finished fixes in fidvid.c it may well be that. But if 
> I turn on post to serial port it seems to always hang at memory training.
> I'll disregard all that atcontinue with fidvid fornow
>
> In any case, I've come across this code that looks wrong.
> This patch makes no difference for me at runtime, but I still 
> feel it must fix something. I'm not sure whether the hardcoded 8 for the 
> number of nodes in pDCTstat is correct. I think it might have more 
> elements, but maybe it's enough to deal with the first 8 for some 
> reason ? 
>
> Signed-of-by: Xavi Drudis Ferran <xdrudis@tinet.cat>
> Index: mct_d.c
> ===================================================================
> --- mct_d.c	(revision 5864)
> +++ mct_d.c	(working copy)
Thanks a lot! r5867.

Patch

Index: mct_d.c
===================================================================
--- mct_d.c	(revision 5864)
+++ mct_d.c	(working copy)
@@ -3516,10 +3516,11 @@ 
        for (Node = 0; Node < 8; Node++) {
                pDCTstat = pDCTstatA + Node;
 
-		if (pDCTstat->NodePresent)
+		if (pDCTstat->NodePresent) {
 		      	mct_BeforeDQSTrainSamp(pDCTstat); /* only Bx */
 			mct_ResetDLL_D(pMCTstat, pDCTstat, 0);
 			mct_ResetDLL_D(pMCTstat, pDCTstat, 1);
+		}
 	}
 }