public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@alien8.de>
To: linux-edac <linux-edac@vger.kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH 07/11] EDAC: Issue tracepoint only when it is defined
Date: Thu,  6 Apr 2017 11:06:30 +0200	[thread overview]
Message-ID: <20170406090634.30950-8-bp@alien8.de> (raw)
In-Reply-To: <20170406090634.30950-1-bp@alien8.de>

From: Borislav Petkov <bp@suse.de>

... and this happens only when CONFIG_RAS is enabled.

Signed-off-by: Borislav Petkov <bp@suse.de>
---
 drivers/edac/edac_mc.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/edac/edac_mc.c b/drivers/edac/edac_mc.c
index 681387d20fb9..735546ea6ebe 100644
--- a/drivers/edac/edac_mc.c
+++ b/drivers/edac/edac_mc.c
@@ -1180,10 +1180,13 @@ void edac_mc_handle_error(const enum hw_event_mc_err_type type,
 
 	/* Report the error via the trace interface */
 	grain_bits = fls_long(e->grain) + 1;
-	trace_mc_event(type, e->msg, e->label, e->error_count,
-		       mci->mc_idx, e->top_layer, e->mid_layer, e->low_layer,
-		       (e->page_frame_number << PAGE_SHIFT) | e->offset_in_page,
-		       grain_bits, e->syndrome, e->other_detail);
+
+	if (IS_ENABLED(CONFIG_RAS))
+		trace_mc_event(type, e->msg, e->label, e->error_count,
+			       mci->mc_idx, e->top_layer, e->mid_layer,
+			       e->low_layer,
+			       (e->page_frame_number << PAGE_SHIFT) | e->offset_in_page,
+			       grain_bits, e->syndrome, e->other_detail);
 
 	edac_raw_mc_handle_error(type, mci, e);
 }
-- 
2.11.0

  parent reply	other threads:[~2017-04-06  9:09 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-06  9:06 [PATCH 00/11] EDAC: Remove edac_stub.c Borislav Petkov
2017-04-06  9:06 ` [PATCH 01/11] EDAC, highbank: Align Makefile directives Borislav Petkov
2017-04-06  9:06 ` [PATCH 02/11] x86/nmi, EDAC: Get rid of DRAM error reporting thru PCI SERR NMI Borislav Petkov
2017-04-10 13:39   ` Thomas Gleixner
2017-04-10 14:59     ` Borislav Petkov
2017-04-06  9:06 ` [PATCH 03/11] EDAC: Get rid of edac_handlers Borislav Petkov
2017-04-06  9:06 ` [PATCH 04/11] EDAC: Remove edac_err_assert Borislav Petkov
2017-04-06  9:06 ` [PATCH 05/11] EDAC: Move edac_op_state to edac_mc.c Borislav Petkov
2017-04-06  9:06 ` [PATCH 06/11] ACPI/extlog: Add EDAC dependency Borislav Petkov
2017-04-06  9:06 ` Borislav Petkov [this message]
2017-04-06  9:06 ` [PATCH 08/11] EDAC: Remove EDAC_MM_EDAC Borislav Petkov
2017-04-06  9:06 ` [PATCH 09/11] EDAC: Update Kconfig help text Borislav Petkov
2017-04-06  9:06 ` [PATCH 10/11] EDAC: Delete edac_stub.c Borislav Petkov
2017-04-06  9:06 ` [PATCH 11/11] EDAC: Rename report status accessors Borislav Petkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170406090634.30950-8-bp@alien8.de \
    --to=bp@alien8.de \
    --cc=linux-edac@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox