Skip to contentSkip to conversation

Patch "EDAC, i5000, i5400: Fix use of MTR_DRAM_WIDTH macro" has been added to the 4.9-stable tree

PATCH Greg Kroah-Hartman 1 participant 1 message Dec 12, 2017

Subsystems (4)
lore
Share & tools
lore

Greg Kroah-Hartman

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

    EDAC, i5000, i5400: Fix use of MTR_DRAM_WIDTH macro

to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:

     edac-i5000-i5400-fix-use-of-mtr_dram_width-macro.patch

and it can be found in the queue-4.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

From foo@baz Tue Dec 12 13:26:17 CET 2017
From: Jérémy Lefaure <[email protected]>
Date: Wed, 8 Mar 2017 20:18:09 -0500
Subject: EDAC, i5000, i5400: Fix use of MTR_DRAM_WIDTH macro

From: Jérémy Lefaure <[email protected]>

[ Upstream commit e61555c29c28a4a3b6ba6207f4a0883ee236004d ]

The MTR_DRAM_WIDTH macro returns the data width. It is sometimes used as if it returned a boolean true if the width if 8. Fix the tests where MTR_DRAM_WIDTH is misused.

---
 drivers/edac/i5000_edac.c |    2 +-
 drivers/edac/i5400_edac.c |    5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)

Patches currently in stable-queue which might be from [email protected] are

queue-4.9/edac-i5000-i5400-fix-definition-of-nrecmemb-register.patch queue-4.9/edac-i5000-i5400-fix-use-of-mtr_dram_width-macro.patch --
To unsubscribe from this list: send the line "unsubscribe linux-edac" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

drivers/edac/i5000_edac.c +1 -1
@@ -1293,7 +1293,7 @@ static int i5000_init_csrows(struct mem_
 			dimm->mtype = MEM_FB_DDR2;
 
 			/* ask what device type on this row */
-			if (MTR_DRAM_WIDTH(mtr))
+			if (MTR_DRAM_WIDTH(mtr) == 8)
 				dimm->dtype = DEV_X8;
 			else
 				dimm->dtype = DEV_X4;
drivers/edac/i5400_edac.c +3 -2
@@ -1207,13 +1207,14 @@ static int i5400_init_dimms(struct mem_c
 
 			dimm->nr_pages = size_mb << 8;
 			dimm->grain = 8;
-			dimm->dtype = MTR_DRAM_WIDTH(mtr) ? DEV_X8 : DEV_X4;
+			dimm->dtype = MTR_DRAM_WIDTH(mtr) == 8 ?
+				      DEV_X8 : DEV_X4;
 			dimm->mtype = MEM_FB_DDR2;
 			/*
 			 * The eccc mechanism is SDDC (aka SECC), with
 			 * is similar to Chipkill.
 			 */
-			dimm->edac_mode = MTR_DRAM_WIDTH(mtr) ?
+			dimm->edac_mode = MTR_DRAM_WIDTH(mtr) == 8 ?
 					  EDAC_S8ECD8ED : EDAC_S4ECD4ED;
 			ndimms++;
 		}