Re: [PATCH 0/5] hwmon: Replace sprintf() with sysfs_emit()

From: Guenter Roeck

Date: Mon Mar 02 2026 - 16:51:27 EST


On 3/2/26 11:28, Amay Agarwal wrote:
This series of commits replaces sprintf() with sysfs_emit() in the code
for several drivers (tc74, max31722, ads7828, max6659, emc1403) and
helps avoid potential buffer overflows.

Amay Agarwal (5):
hwmon: tc74: use sysfs_emit() instead of sprintf()
hwmon: max31722: use sysfs_emit() instead of sprintf()
hwmon: ads7828: use sysfs_emit() instead of sprintf()
hwmon: max6650: use sysfs_emit() instead of sprintf()
hwmon: emc1403: use sysfs_emit() instead of sprintf()

drivers/hwmon/ads7828.c | 2 +-
drivers/hwmon/emc1403.c | 2 +-
drivers/hwmon/max31722.c | 3 ++-
drivers/hwmon/max6650.c | 3 ++-
drivers/hwmon/tc74.c | 2 +-
5 files changed, 7 insertions(+), 5 deletions(-)

Thank you,
Amay

I have not seen patches 3..5 yet, but I bet I am sure they have
the same problem as the first two patches, so I won't separately
comment on those.

Guenter