From 0eff7c35479b359bdd6fb4ddb97c4b3b96606262 Mon Sep 17 00:00:00 2001 From: Massinissa Ghoul Date: Mon, 7 Sep 2026 00:35:02 +0200 Subject: [PATCH] hwmon: (hih6130) Replace sprintf() with sysfs_emit() Use sysfs_emit() instead of sprintf() in the sysfs show functions hih6130_temperature_show() and hih6130_humidity_show() to use the preferred kernel interface for writing to sysfs buffers. No functional change intended. Note: Not runtime tested due to lack of hardware. Signed-off-by: Massinissa Ghoul Link: https://patch.msgid.link/20260907-hwmon-hih6130-sysfs-emit-v1-1-a1adb5245d0f@gmail.com Signed-off-by: Guenter Roeck --- drivers/hwmon/hih6130.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/hwmon/hih6130.c b/drivers/hwmon/hih6130.c index 7984be1e706d..6a79aab5d128 100644 --- a/drivers/hwmon/hih6130.c +++ b/drivers/hwmon/hih6130.c @@ -168,7 +168,7 @@ static ssize_t hih6130_temperature_show(struct device *dev, ret = hih6130_update_measurements(dev); if (ret < 0) return ret; - return sprintf(buf, "%d\n", hih6130->temperature); + return sysfs_emit(buf, "%d\n", hih6130->temperature); } /** @@ -189,7 +189,7 @@ static ssize_t hih6130_humidity_show(struct device *dev, ret = hih6130_update_measurements(dev); if (ret < 0) return ret; - return sprintf(buf, "%d\n", hih6130->humidity); + return sysfs_emit(buf, "%d\n", hih6130->humidity); } /* sysfs attributes */