Commit d391a7b8 authored by Douglas Thompson's avatar Douglas Thompson Committed by Linus Torvalds

drivers/edac: device output clenaup

The error handling output strings needed to be refactored for better
displaying of the error informaton.

Also needed to added offset_value for output as well
Signed-off-by: default avatarDouglas Thompson <dougthompson@xmission.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 42a8e397
...@@ -158,7 +158,7 @@ struct edac_device_ctl_info *edac_device_alloc_ctl_info( ...@@ -158,7 +158,7 @@ struct edac_device_ctl_info *edac_device_alloc_ctl_info(
attrib_p = &dev_attrib[block * nr_attribs]; attrib_p = &dev_attrib[block * nr_attribs];
blk->attribs = attrib_p; blk->attribs = attrib_p;
snprintf(blk->name, sizeof(blk->name), snprintf(blk->name, sizeof(blk->name),
"%s%d", edac_block_name, block + 1); "%s%d", edac_block_name, block+offset_value);
blk->name[sizeof(blk->name) - 1] = '\0'; blk->name[sizeof(blk->name) - 1] = '\0';
debugf1("%s() instance=%d block=%d name=%s\n", debugf1("%s() instance=%d block=%d name=%s\n",
...@@ -580,7 +580,7 @@ void edac_device_handle_ce(struct edac_device_ctl_info *edac_dev, ...@@ -580,7 +580,7 @@ void edac_device_handle_ce(struct edac_device_ctl_info *edac_dev,
if (edac_device_get_log_ce(edac_dev)) if (edac_device_get_log_ce(edac_dev))
edac_device_printk(edac_dev, KERN_WARNING, edac_device_printk(edac_dev, KERN_WARNING,
"CE ctl: %s, instance: %s, block: %s: %s\n", "CE: %s instance: %s block: %s '%s'\n",
edac_dev->ctl_name, instance->name, edac_dev->ctl_name, instance->name,
block ? block->name : "N/A", msg); block ? block->name : "N/A", msg);
} }
...@@ -626,12 +626,12 @@ void edac_device_handle_ue(struct edac_device_ctl_info *edac_dev, ...@@ -626,12 +626,12 @@ void edac_device_handle_ue(struct edac_device_ctl_info *edac_dev,
if (edac_device_get_log_ue(edac_dev)) if (edac_device_get_log_ue(edac_dev))
edac_device_printk(edac_dev, KERN_EMERG, edac_device_printk(edac_dev, KERN_EMERG,
"UE ctl: %s, instance: %s, block: %s: %s\n", "UE: %s instance: %s block: %s '%s'\n",
edac_dev->ctl_name, instance->name, edac_dev->ctl_name, instance->name,
block ? block->name : "N/A", msg); block ? block->name : "N/A", msg);
if (edac_device_get_panic_on_ue(edac_dev)) if (edac_device_get_panic_on_ue(edac_dev))
panic("EDAC %s: UE instance: %s, block %s: %s\n", panic("EDAC %s: UE instance: %s block %s '%s'\n",
edac_dev->ctl_name, instance->name, edac_dev->ctl_name, instance->name,
block ? block->name : "N/A", msg); block ? block->name : "N/A", msg);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment