bus: fsl-mc: replace snprintf in show functions with sysfs_emit
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/1 bus: fsl-mc: replace snprintf in show functions with sysfs_emit
show() should not use snprintf() when formatting the value to be returned to user space.
Fix the following coccicheck warning:drivers/media/i2c/ccs/ccs-core.c:3761: WARNING: use scnprintf or sprintf.
./drivers/bus/fsl-mc/fsl-mc-bus.c:204:8-16: WARNING: use scnprintf or sprintf
Signed-off-by ztt <[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
@@ -201,7 +201,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 scnprintf (buf,PAGE_SIZE ,"%s\n" , mc_dev->driver_override); }static DEVICE_ATTR_RW (driver_override);