Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

iio: light: Convert sysfs sprintf/snprintf family to sysfs_emit

Fix the following coccicheck warning:
drivers/iio/light/veml6030.c:131:8-16: WARNING:
use scnprintf or sprintf

Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
Link: https://lore.kernel.org/r/1618216751-1678-3-git-send-email-tiantao6@hisilicon.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Tian Tao and committed by
Jonathan Cameron
c79859bd 643adb9a

+1 -1
+1 -1
drivers/iio/light/veml6030.c
··· 128 128 return -EINVAL; 129 129 } 130 130 131 - return snprintf(buf, PAGE_SIZE, "%s\n", period_values[x]); 131 + return sysfs_emit(buf, "%s\n", period_values[x]); 132 132 } 133 133 134 134 static IIO_DEVICE_ATTR_RO(in_illuminance_period_available, 0);