Commit 643adb9a authored by Tian Tao's avatar Tian Tao Committed by Jonathan Cameron
Browse files

iio:chemical:sps30: Convert sysfs sprintf/snprintf family to sysfs_emit



Fix the following coccicheck warning:
./drivers/iio/chemical/sps30.c:414:8-16: WARNING:
use scnprintf or sprintf

Signed-off-by: default avatarTian Tao <tiantao6@hisilicon.com>
Link: https://lore.kernel.org/r/1618216751-1678-2-git-send-email-tiantao6@hisilicon.com


Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent df041e73
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -411,7 +411,7 @@ static ssize_t cleaning_period_available_show(struct device *dev,
					      struct device_attribute *attr,
					      char *buf)
{
	return snprintf(buf, PAGE_SIZE, "[%d %d %d]\n",
	return sysfs_emit(buf, "[%d %d %d]\n",
			  SPS30_AUTO_CLEANING_PERIOD_MIN, 1,
			  SPS30_AUTO_CLEANING_PERIOD_MAX);
}