Skip to contentSkip to conversation

nvme: warn only once for legacy uuid attribute

PATCH In review Keith Busch 4 participants 4 messages Jul 12, 2023 – Jul 13, 2023 NVMe

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 nvme: warn only once for legacy uuid attribute

From: Keith Busch <[email protected]>

Report the legacy fallback behavior for uuid attributes just once instead of logging repeated warnings for the same condition every time the attribute is read. The old behavior is too spamy on the kernel logs.

---
 drivers/nvme/host/sysfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nvme/host/sysfs.c +1 -1
index 45e91811f905c..212e1b05d2984 100644
@@ -92,7 +92,7 @@ static ssize_t uuid_show(struct device *dev, struct device_attribute *attr,
 	 * we have no UUID set
 	 */
 	if (uuid_is_null(&ids->uuid)) {
-		dev_warn_ratelimited(dev,
+		dev_warn_once(dev,
 			"No UUID available providing old NGUID\n");
 		return sysfs_emit(buf, "%pU\n", ids->nguid);
 	}
Signature · 1 line
2.34.1