summaryrefslogtreecommitdiff
path: root/drivers/edac/amd64_edac.c
diff options
context:
space:
mode:
authorCatalin Marinas <catalin.marinas@arm.com>2012-11-05 14:58:32 (GMT)
committerCatalin Marinas <catalin.marinas@arm.com>2012-11-05 14:58:32 (GMT)
commit3fd9396af83a1e69eaf9ebb573207431d8f265b6 (patch)
treef221f5777695de71ea97423c67438bca1746e26c /drivers/edac/amd64_edac.c
parente3978cded41dc7b364e74037f56d6bc558c11fd7 (diff)
parent3d70f8c617a436c7146ecb81df2265b4626dfe89 (diff)
downloadlinux-fsl-qoriq-3fd9396af83a1e69eaf9ebb573207431d8f265b6.tar.xz
Merge tag 'v3.7-rc4' into upstream-master
Linux 3.7-rc4
Diffstat (limited to 'drivers/edac/amd64_edac.c')
-rw-r--r--drivers/edac/amd64_edac.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c
index 5a297a2..cc8e7c7 100644
--- a/drivers/edac/amd64_edac.c
+++ b/drivers/edac/amd64_edac.c
@@ -170,8 +170,11 @@ static int __amd64_set_scrub_rate(struct pci_dev *ctl, u32 new_bw, u32 min_rate)
* memory controller and apply to register. Search for the first
* bandwidth entry that is greater or equal than the setting requested
* and program that. If at last entry, turn off DRAM scrubbing.
+ *
+ * If no suitable bandwidth is found, turn off DRAM scrubbing entirely
+ * by falling back to the last element in scrubrates[].
*/
- for (i = 0; i < ARRAY_SIZE(scrubrates); i++) {
+ for (i = 0; i < ARRAY_SIZE(scrubrates) - 1; i++) {
/*
* skip scrub rates which aren't recommended
* (see F10 BKDG, F3x58)
@@ -181,12 +184,6 @@ static int __amd64_set_scrub_rate(struct pci_dev *ctl, u32 new_bw, u32 min_rate)
if (scrubrates[i].bandwidth <= new_bw)
break;
-
- /*
- * if no suitable bandwidth found, turn off DRAM scrubbing
- * entirely by falling back to the last element in the
- * scrubrates array.
- */
}
scrubval = scrubrates[i].scrubval;