bus: fsl-mc: Replace snprintf() with sysfs_emit()
PATCH 1/1 bus: fsl-mc: Replace snprintf() with sysfs_emit()
coccicheck complains about the use of snprintf() in sysfs show functions.
Fix the coccicheck warning:
./drivers/bus/fsl-mc/fsl-mc-bus.c:186:8-16: WARNING: use scnprintf or sprintf.
Reported-by Abaci Robot <[email protected]>
Signed-off-by Jiapeng Chong <[email protected]>
--- drivers/bus/fsl-mc/fsl-mc-bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/bus/fsl-mc/fsl-mc-bus.c +1 -1
@@ -183,7 +183,7 @@ static ssize_t driver_override_show(struct device *dev, {struct fsl_mc_device *mc_dev =to_fsl_mc_device (dev); -return snprintf (buf,PAGE_SIZE ,"%s\n" , mc_dev->driver_override); +return sysfs_emit (buf,"%s\n" , mc_dev->driver_override); }static DEVICE_ATTR_RW (driver_override);
Signature · 1 line
2.20.1.7.g153144c