summaryrefslogtreecommitdiff
path: root/drivers/mtd/mtdblock_ro.c
diff options
context:
space:
mode:
authorColin Ian King <colin.i.king@gmail.com>2023-07-19 11:33:54 +0100
committerMiquel Raynal <miquel.raynal@bootlin.com>2023-07-27 17:16:14 +0200
commitd2236f6219fac62ee22d971e06a04148f4eb8cca (patch)
tree4e4fd5992742420a73db309c769278dde57f9513 /drivers/mtd/mtdblock_ro.c
parentc2fc6b6947905eee832e9ef445df4803f0056cc6 (diff)
mtdblock: make warning messages ratelimited
When exercising various dev interfaces with stress-ng the mtdblock drivers can be (ab)used to generate a lot of warning messages. Make these rate limited to reduce the kernel log from being spammed with the same messages. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/linux-mtd/20230719103354.2829366-1-colin.i.king@gmail.com
Diffstat (limited to 'drivers/mtd/mtdblock_ro.c')
-rw-r--r--drivers/mtd/mtdblock_ro.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/mtdblock_ro.c b/drivers/mtd/mtdblock_ro.c
index 66ffc9f1ead2..ef6299af60e4 100644
--- a/drivers/mtd/mtdblock_ro.c
+++ b/drivers/mtd/mtdblock_ro.c
@@ -49,7 +49,7 @@ static void mtdblock_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd)
dev->readonly = 1;
if (mtd_type_is_nand(mtd))
- pr_warn("%s: MTD device '%s' is NAND, please consider using UBI block devices instead.\n",
+ pr_warn_ratelimited("%s: MTD device '%s' is NAND, please consider using UBI block devices instead.\n",
tr->name, mtd->name);
if (add_mtd_blktrans_dev(dev))