Skip to content

Commit 4949603

Browse files
Markus TrippelsdorfBorislav Petkov
authored andcommitted
EDAC: Remove debugging output in scrub rate handling
This patch removes superfluous debugging output in the sysfs scrub rate handler. It also consolidates the error handling in the scrub rate accessors. Signed-off-by: Markus Trippelsdorf <[email protected]> Signed-off-by: Borislav Petkov <[email protected]>
1 parent f0e615c commit 4949603

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

drivers/edac/amd64_edac.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,6 @@ static int amd64_get_scrub_rate(struct mem_ctl_info *mci)
211211

212212
scrubval = scrubval & 0x001F;
213213

214-
amd64_debug("pci-read, sdram scrub control value: %d\n", scrubval);
215-
216214
for (i = 0; i < ARRAY_SIZE(scrubrates); i++) {
217215
if (scrubrates[i].scrubval == scrubval) {
218216
retval = scrubrates[i].bandwidth;

drivers/edac/edac_mc_sysfs.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -458,13 +458,13 @@ static ssize_t mci_sdram_scrub_rate_store(struct mem_ctl_info *mci,
458458
return -EINVAL;
459459

460460
new_bw = mci->set_sdram_scrub_rate(mci, bandwidth);
461-
if (new_bw >= 0) {
462-
edac_printk(KERN_DEBUG, EDAC_MC, "Scrub rate set to %d\n", new_bw);
463-
return count;
461+
if (new_bw < 0) {
462+
edac_printk(KERN_WARNING, EDAC_MC,
463+
"Error setting scrub rate to: %lu\n", bandwidth);
464+
return -EINVAL;
464465
}
465466

466-
edac_printk(KERN_DEBUG, EDAC_MC, "Error setting scrub rate to: %lu\n", bandwidth);
467-
return -EINVAL;
467+
return count;
468468
}
469469

470470
/*
@@ -483,7 +483,6 @@ static ssize_t mci_sdram_scrub_rate_show(struct mem_ctl_info *mci, char *data)
483483
return bandwidth;
484484
}
485485

486-
edac_printk(KERN_DEBUG, EDAC_MC, "Read scrub rate: %d\n", bandwidth);
487486
return sprintf(data, "%d\n", bandwidth);
488487
}
489488

0 commit comments

Comments
 (0)