2014-12-02 17:59:01

by Tony Luck

[permalink] [raw]
Subject: [PATCH] sb_edac: Fix typo computing number of banks

Code will always think there are 16 banks because of a typo

Reported-by: Misha
Signed-off-by: Tony Luck <[email protected]>
---

Not sure if Misha is shy, or just busy. But my attempt to get
them to post their own patch didn't work

drivers/edac/sb_edac.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/edac/sb_edac.c b/drivers/edac/sb_edac.c
index 993e8b61c4b2..63aa6730e89e 100644
--- a/drivers/edac/sb_edac.c
+++ b/drivers/edac/sb_edac.c
@@ -901,7 +901,7 @@ static int get_dimm_config(struct mem_ctl_info *mci)
else
edac_dbg(0, "Memory is unregistered\n");

- if (mtype == MEM_DDR4 || MEM_RDDR4)
+ if (mtype == MEM_DDR4 || mtype == MEM_RDDR4)
banks = 16;
else
banks = 8;
--
2.1.0


2014-12-02 18:18:21

by Aristeu Rozanski

[permalink] [raw]
Subject: Re: [PATCH] sb_edac: Fix typo computing number of banks

On Tue, Dec 02, 2014 at 09:41:58AM -0800, Tony Luck wrote:
> Code will always think there are 16 banks because of a typo
>
> Reported-by: Misha
> Signed-off-by: Tony Luck <[email protected]>
> ---
>
> Not sure if Misha is shy, or just busy. But my attempt to get
> them to post their own patch didn't work
>
> drivers/edac/sb_edac.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/edac/sb_edac.c b/drivers/edac/sb_edac.c
> index 993e8b61c4b2..63aa6730e89e 100644
> --- a/drivers/edac/sb_edac.c
> +++ b/drivers/edac/sb_edac.c
> @@ -901,7 +901,7 @@ static int get_dimm_config(struct mem_ctl_info *mci)
> else
> edac_dbg(0, "Memory is unregistered\n");
>
> - if (mtype == MEM_DDR4 || MEM_RDDR4)
> + if (mtype == MEM_DDR4 || mtype == MEM_RDDR4)
> banks = 16;
> else
> banks = 8;

ACK

--
Aristeu

2014-12-02 19:04:15

by Mauro Carvalho Chehab

[permalink] [raw]
Subject: Re: [PATCH] sb_edac: Fix typo computing number of banks

Em Tue, 2 Dec 2014 13:17:58 -0500
Aristeu Rozanski <[email protected]> escreveu:

> On Tue, Dec 02, 2014 at 09:41:58AM -0800, Tony Luck wrote:
> > Code will always think there are 16 banks because of a typo
> >
> > Reported-by: Misha
> > Signed-off-by: Tony Luck <[email protected]>

Applied, thanks!

> > ---
> >
> > Not sure if Misha is shy, or just busy. But my attempt to get
> > them to post their own patch didn't work
> >
> > drivers/edac/sb_edac.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/edac/sb_edac.c b/drivers/edac/sb_edac.c
> > index 993e8b61c4b2..63aa6730e89e 100644
> > --- a/drivers/edac/sb_edac.c
> > +++ b/drivers/edac/sb_edac.c
> > @@ -901,7 +901,7 @@ static int get_dimm_config(struct mem_ctl_info *mci)
> > else
> > edac_dbg(0, "Memory is unregistered\n");
> >
> > - if (mtype == MEM_DDR4 || MEM_RDDR4)
> > + if (mtype == MEM_DDR4 || mtype == MEM_RDDR4)
> > banks = 16;
> > else
> > banks = 8;
>
> ACK
>