linux-edac.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lei Wang <wangglei@gmail.com>
To: bp@alien8.de, mchehab@kernel.org, tony.luck@intel.com,
	james.morse@arm.com, rric@kernel.org
Cc: linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org,
	lewan@microsoft.com, hangl@microsoft.com,
	tyhicks@linux.microsoft.com, bwaller@microsoft.com,
	Lei Wang <wangglei@gmail.com>
Subject: [PATCH] EDAC: update edac printk wrappers to use printk_ratelimited.
Date: Wed,  5 May 2021 10:30:27 -0700	[thread overview]
Message-ID: <20210505173027.78428-1-wangglei@gmail.com> (raw)

Update printk to the ratelimited version, so that in some corner cases when
vast of CE errors show up, the kernel logging can be suppressed.

Signed-off-by: Lei Wang <wangglei@gmail.com>
---
 drivers/edac/edac_mc.h | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/edac/edac_mc.h b/drivers/edac/edac_mc.h
index 881b00eadf7a..355529317980 100644
--- a/drivers/edac/edac_mc.h
+++ b/drivers/edac/edac_mc.h
@@ -46,19 +46,19 @@
 #endif
 
 #define edac_printk(level, prefix, fmt, arg...) \
-	printk(level "EDAC " prefix ": " fmt, ##arg)
+	printk_ratelimited(level "EDAC " prefix ": " fmt, ##arg)
 
 #define edac_mc_printk(mci, level, fmt, arg...) \
-	printk(level "EDAC MC%d: " fmt, mci->mc_idx, ##arg)
+	printk_ratelimited(level "EDAC MC%d: " fmt, mci->mc_idx, ##arg)
 
 #define edac_mc_chipset_printk(mci, level, prefix, fmt, arg...) \
-	printk(level "EDAC " prefix " MC%d: " fmt, mci->mc_idx, ##arg)
+	printk_ratelimited(level "EDAC " prefix " MC%d: " fmt, mci->mc_idx, ##arg)
 
 #define edac_device_printk(ctl, level, fmt, arg...) \
-	printk(level "EDAC DEVICE%d: " fmt, ctl->dev_idx, ##arg)
+	printk_ratelimited(level "EDAC DEVICE%d: " fmt, ctl->dev_idx, ##arg)
 
 #define edac_pci_printk(ctl, level, fmt, arg...) \
-	printk(level "EDAC PCI%d: " fmt, ctl->pci_idx, ##arg)
+	printk_ratelimited(level "EDAC PCI%d: " fmt, ctl->pci_idx, ##arg)
 
 /* prefixes for edac_printk() and edac_mc_printk() */
 #define EDAC_MC "MC"
-- 
2.17.1


             reply	other threads:[~2021-05-05 17:57 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-05 17:30 Lei Wang [this message]
2021-05-05 18:01 ` [PATCH] EDAC: update edac printk wrappers to use printk_ratelimited Borislav Petkov
2021-05-05 19:02   ` [EXTERNAL] " Lei Wang (DPLAT)
2021-05-05 19:45     ` Borislav Petkov
2021-05-05 20:23       ` Tyler Hicks
2021-05-05 21:04         ` Borislav Petkov
2021-05-05 21:48           ` Tyler Hicks
2021-05-05 22:02             ` Borislav Petkov
2021-05-05 22:16               ` Tyler Hicks
2021-05-05 22:43                 ` Tyler Hicks
2021-05-05 22:55                   ` Borislav Petkov
2021-05-05 23:01                     ` Tyler Hicks
2021-05-05 23:13                       ` Luck, Tony
2021-05-06  7:16                       ` Mauro Carvalho Chehab

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=20210505173027.78428-1-wangglei@gmail.com \
    --to=wangglei@gmail.com \
    --cc=bp@alien8.de \
    --cc=bwaller@microsoft.com \
    --cc=hangl@microsoft.com \
    --cc=james.morse@arm.com \
    --cc=lewan@microsoft.com \
    --cc=linux-edac@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=rric@kernel.org \
    --cc=tony.luck@intel.com \
    --cc=tyhicks@linux.microsoft.com \
    /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;
as well as URLs for NNTP newsgroup(s).