Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c1053839 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab
Browse files

sb_edac: properly handle error count



Instead of reporting the error count via driver-specific details,
use the new way provided by edac_mc_handle_error.

Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 00d18339
Loading
Loading
Loading
Loading
+3 −4
Original line number Original line Diff line number Diff line
@@ -1432,8 +1432,7 @@ static void sbridge_mce_output_error(struct mem_ctl_info *mci,
	 * to the group of dimm's where the error may be happening.
	 * to the group of dimm's where the error may be happening.
	 */
	 */
	snprintf(msg, sizeof(msg),
	snprintf(msg, sizeof(msg),
		 "count:%d%s%s area:%s err_code:%04x:%04x socket:%d channel_mask:%ld rank:%d",
		 "%s%s area:%s err_code:%04x:%04x socket:%d channel_mask:%ld rank:%d",
		 core_err_cnt,
		 overflow ? " OVERFLOW" : "",
		 overflow ? " OVERFLOW" : "",
		 (uncorrected_error && recoverable) ? " recoverable" : "",
		 (uncorrected_error && recoverable) ? " recoverable" : "",
		 area_type,
		 area_type,
@@ -1447,13 +1446,13 @@ static void sbridge_mce_output_error(struct mem_ctl_info *mci,
	/* FIXME: need support for channel mask */
	/* FIXME: need support for channel mask */


	/* Call the helper to output message */
	/* Call the helper to output message */
	edac_mc_handle_error(tp_event, mci, 1,
	edac_mc_handle_error(tp_event, mci, core_err_cnt,
			     m->addr >> PAGE_SHIFT, m->addr & ~PAGE_MASK, 0,
			     m->addr >> PAGE_SHIFT, m->addr & ~PAGE_MASK, 0,
			     channel, dimm, -1,
			     channel, dimm, -1,
			     optype, msg);
			     optype, msg);
	return;
	return;
err_parsing:
err_parsing:
	edac_mc_handle_error(tp_event, mci, 1, 0, 0, 0,
	edac_mc_handle_error(tp_event, mci, core_err_cnt, 0, 0, 0,
			     -1, -1, -1,
			     -1, -1, -1,
			     msg, "");
			     msg, "");