summaryrefslogtreecommitdiffstats
path: root/drivers/iio
diff options
context:
space:
mode:
authorTian Tao <tiantao6@hisilicon.com>2021-04-12 10:39:11 +0200
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2021-05-17 14:49:05 +0200
commit8bad6050654b46ac7ea40c5c5f9ec79396b175a3 (patch)
treebb8666c31c2b05e0db8c73f7b07755fa334d5f71 /drivers/iio
parentiio: light: Convert sysfs sprintf/snprintf family to sysfs_emit (diff)
downloadlinux-8bad6050654b46ac7ea40c5c5f9ec79396b175a3.tar.xz
linux-8bad6050654b46ac7ea40c5c5f9ec79396b175a3.zip
iio: trigger: stm32-timer: Convert sysfs sprintf/snprintf family to sysfs_emit
Fix the following coccicheck warning: drivers/iio/trigger/stm32-timer-trigger.c:299:8-16: WARNING: use scnprintf or sprintf Signed-off-by: Tian Tao <tiantao6@hisilicon.com> Link: https://lore.kernel.org/r/1618216751-1678-4-git-send-email-tiantao6@hisilicon.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio')
-rw-r--r--drivers/iio/trigger/stm32-timer-trigger.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/trigger/stm32-timer-trigger.c b/drivers/iio/trigger/stm32-timer-trigger.c
index 3aa9e8bba005..33083877cd19 100644
--- a/drivers/iio/trigger/stm32-timer-trigger.c
+++ b/drivers/iio/trigger/stm32-timer-trigger.c
@@ -296,7 +296,7 @@ static ssize_t stm32_tt_show_master_mode(struct device *dev,
else
cr2 = (cr2 & TIM_CR2_MMS) >> TIM_CR2_MMS_SHIFT;
- return snprintf(buf, PAGE_SIZE, "%s\n", master_mode_table[cr2]);
+ return sysfs_emit(buf, "%s\n", master_mode_table[cr2]);
}
static ssize_t stm32_tt_store_master_mode(struct device *dev,