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

Loc Ho lho at apm.com
Thu May 8 16:03:16 PDT 2014


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 at apm.com>
---
 drivers/edac/edac_mc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

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
-- 
1.5.5




More information about the linux-arm-kernel mailing list