Commit 8bad6050 authored by Tian Tao's avatar Tian Tao Committed by Jonathan Cameron

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: default avatarTian Tao <tiantao6@hisilicon.com>
Link: https://lore.kernel.org/r/1618216751-1678-4-git-send-email-tiantao6@hisilicon.comSigned-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent c79859bd
...@@ -296,7 +296,7 @@ static ssize_t stm32_tt_show_master_mode(struct device *dev, ...@@ -296,7 +296,7 @@ static ssize_t stm32_tt_show_master_mode(struct device *dev,
else else
cr2 = (cr2 & TIM_CR2_MMS) >> TIM_CR2_MMS_SHIFT; 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, static ssize_t stm32_tt_store_master_mode(struct device *dev,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment