staging: fbtft: Use sysfs_emit for show(device *...) functions
Subsystems (2)
PATCH 1/1 staging: fbtft: Use sysfs_emit for show(device *...) functions
Convert snprintf calls in device show functions to sysfs_emit for PAGE_SIZE buffer safety.
Warning generated by: scripts/coccinelle/api/device_attr_show.cocci
Signed-off-by Deepak R Varma <[email protected]>
--- drivers/staging/fbtft/fbtft-sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/fbtft/fbtft-sysfs.c +1 -1
@@ -199,7 +199,7 @@ static ssize_t show_debug(struct device *device,struct fb_info *fb_info =dev_get_drvdata (device);struct fbtft_par *par = fb_info->par; -return snprintf (buf,PAGE_SIZE ,"%lu\n" , par->debug); +return sysfs_emit (buf,"%lu\n" , par->debug); } static struct device_attribute debug_device_attr =
Signature · 1 line
2.25.1