[PATCH] logic_pio: use pr_err_ratelimited() in find_io_range()
From: Luo Qiu
Date: Tue Nov 04 2025 - 04:44:03 EST
The pr_err() in find_io_range() can be triggered repeatedly when
invalid PIO tokens are encountered, potentially flooding the kernel
log with duplicate error messages. This is particularly problematic
in scenarios where drivers may repeatedly attempt to access invalid
PIO ranges.
Signed-off-by: Luo Qiu <luoqiu@xxxxxxxxxxxxxxx>
---
lib/logic_pio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/logic_pio.c b/lib/logic_pio.c
index e29496a38d06..d8f583246a1b 100644
--- a/lib/logic_pio.c
+++ b/lib/logic_pio.c
@@ -153,7 +153,7 @@ static struct logic_pio_hwaddr *find_io_range(unsigned long pio)
rcu_read_unlock();
if (!found_range)
- pr_err("PIO entry token 0x%lx invalid\n", pio);
+ pr_err_ratelimited("PIO entry token 0x%lx invalid\n", pio);
return found_range;
}
--
2.51.2