aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/edac
diff options
context:
space:
mode:
authorBorislav Petkov <borislav.petkov@amd.com>2012-09-10 11:57:44 -0400
committerBorislav Petkov <bp@alien8.de>2012-11-28 05:23:50 -0500
commit4da1b7bfe7699881c761d71b5e299a65bce48ab2 (patch)
tree24a4325d965ed0f9c7fe7d30382e81d56cb5f882 /drivers/edac
parent37929874d439d79e8f6128f400f63069ee1bbf3e (diff)
EDAC: Remove useless assignment of error type
The tracepoint decodes the error type later anyway so remove a useless assignment to the temporary p which gets overwritten later anyway. Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
Diffstat (limited to 'drivers/edac')
-rw-r--r--drivers/edac/edac_mc.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/edac/edac_mc.c b/drivers/edac/edac_mc.c
index 90f0b730e9bb..d5074222db69 100644
--- a/drivers/edac/edac_mc.c
+++ b/drivers/edac/edac_mc.c
@@ -1093,10 +1093,6 @@ void edac_mc_handle_error(const enum hw_event_mc_err_type type,
1093 */ 1093 */
1094 for (i = 0; i < mci->n_layers; i++) { 1094 for (i = 0; i < mci->n_layers; i++) {
1095 if (pos[i] >= (int)mci->layers[i].size) { 1095 if (pos[i] >= (int)mci->layers[i].size) {
1096 if (type == HW_EVENT_ERR_CORRECTED)
1097 p = "CE";
1098 else
1099 p = "UE";
1100 1096
1101 edac_mc_printk(mci, KERN_ERR, 1097 edac_mc_printk(mci, KERN_ERR,
1102 "INTERNAL ERROR: %s value is out of range (%d >= %d)\n", 1098 "INTERNAL ERROR: %s value is out of range (%d >= %d)\n",
@@ -1128,6 +1124,7 @@ void edac_mc_handle_error(const enum hw_event_mc_err_type type,
1128 grain = 0; 1124 grain = 0;
1129 p = label; 1125 p = label;
1130 *p = '\0'; 1126 *p = '\0';
1127
1131 for (i = 0; i < mci->tot_dimms; i++) { 1128 for (i = 0; i < mci->tot_dimms; i++) {
1132 struct dimm_info *dimm = mci->dimms[i]; 1129 struct dimm_info *dimm = mci->dimms[i];
1133 1130
@@ -1195,6 +1192,7 @@ void edac_mc_handle_error(const enum hw_event_mc_err_type type,
1195 1192
1196 /* Fill the RAM location data */ 1193 /* Fill the RAM location data */
1197 p = location; 1194 p = location;
1195
1198 for (i = 0; i < mci->n_layers; i++) { 1196 for (i = 0; i < mci->n_layers; i++) {
1199 if (pos[i] < 0) 1197 if (pos[i] < 0)
1200 continue; 1198 continue;
@@ -1207,7 +1205,6 @@ void edac_mc_handle_error(const enum hw_event_mc_err_type type,
1207 *(p - 1) = '\0'; 1205 *(p - 1) = '\0';
1208 1206
1209 /* Report the error via the trace interface */ 1207 /* Report the error via the trace interface */
1210
1211 grain_bits = fls_long(grain) + 1; 1208 grain_bits = fls_long(grain) + 1;
1212 trace_mc_event(type, msg, label, error_count, 1209 trace_mc_event(type, msg, label, error_count,
1213 mci->mc_idx, top_layer, mid_layer, low_layer, 1210 mci->mc_idx, top_layer, mid_layer, low_layer,