[PATCH] nvme-hwmon: log the controller device name

Sagi Grimberg sagi at grimberg.me
Thu Jul 23 21:14:10 EDT 2020


Stay consistent with the rest of the driver

Signed-off-by: Sagi Grimberg <sagi at grimberg.me>
---
 drivers/nvme/host/hwmon.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/nvme/host/hwmon.c b/drivers/nvme/host/hwmon.c
index 23ba8bf678ae..412a6c97c0d8 100644
--- a/drivers/nvme/host/hwmon.c
+++ b/drivers/nvme/host/hwmon.c
@@ -241,7 +241,8 @@ void nvme_hwmon_init(struct nvme_ctrl *ctrl)
 
 	err = nvme_hwmon_get_smart_log(data);
 	if (err) {
-		dev_warn(dev, "Failed to read smart log (error %d)\n", err);
+		dev_warn(ctrl->device,
+			"Failed to read smart log (error %d)\n", err);
 		devm_kfree(dev, data);
 		return;
 	}
-- 
2.25.1




More information about the Linux-nvme mailing list