diff mbox

[1/4] edac: Fix MC scrub mode comparsion bug for correctable error

Message ID 1399590199-12256-2-git-send-email-lho@apm.com (mailing list archive)
State New, archived
Headers show

Commit Message

Loc Ho May 8, 2014, 11:03 p.m. UTC
This patch fixes the MC scrub mode comparsion bug by replacing
'&' with '=='. The MC structure field scrub_mode is integer
type - not bit field.

Signed-off-by: Loc Ho <lho@apm.com>
---
 drivers/edac/edac_mc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Borislav Petkov May 9, 2014, 7:38 a.m. UTC | #1
On Thu, May 08, 2014 at 05:03:16PM -0600, Loc Ho wrote:
> This patch fixes the MC scrub mode comparsion bug by replacing
> '&' with '=='. The MC structure field scrub_mode is integer
> type - not bit field.
> 
> Signed-off-by: Loc Ho <lho@apm.com>

Applied, thanks.
Loc Ho May 9, 2014, 4:17 p.m. UTC | #2
Hi,

>> This patch fixes the MC scrub mode comparsion bug by replacing
>> '&' with '=='. The MC structure field scrub_mode is integer
>> type - not bit field.
>>
>> Signed-off-by: Loc Ho <lho@apm.com>
>
> Applied, thanks.

If I should need to submit future version of the X-Gene EDAC driver, I
will not include this patch.

-Loc
diff mbox

Patch

diff --git a/drivers/edac/edac_mc.c b/drivers/edac/edac_mc.c
index 33edd67..2c694b5 100644
--- a/drivers/edac/edac_mc.c
+++ b/drivers/edac/edac_mc.c
@@ -1018,7 +1018,7 @@  static void edac_ce_error(struct mem_ctl_info *mci,
 	}
 	edac_inc_ce_error(mci, enable_per_layer_report, pos, error_count);
 
-	if (mci->scrub_mode & SCRUB_SW_SRC) {
+	if (mci->scrub_mode == SCRUB_SW_SRC) {
 		/*
 			* Some memory controllers (called MCs below) can remap
 			* memory so that it is still available at a different