From: Keith Busch Date: Wed, 12 Jul 2023 14:54:59 +0000 (-0700) Subject: nvme: warn only once for legacy uuid attribute X-Git-Tag: v6.6.17~4189^2~9^2~10 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b718ae835bd5de891ff6fefa290940b7613d2b07;p=platform%2Fkernel%2Flinux-rpi.git nvme: warn only once for legacy uuid attribute 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. Cc: Johannes Thumshirn Reported-by: Breno Leitao Reviewed-by: Christoph Hellwig Signed-off-by: Keith Busch --- diff --git a/drivers/nvme/host/sysfs.c b/drivers/nvme/host/sysfs.c index 45e91811f905..212e1b05d298 100644 --- a/drivers/nvme/host/sysfs.c +++ b/drivers/nvme/host/sysfs.c @@ -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); }