Skip to content

Commit

Permalink
video: fbdev: omapfb: acx565akm: replace snprintf with sysfs_emit
Browse files Browse the repository at this point in the history
coccinelle report:
./drivers/video/fbdev/omap2/omapfb/displays/panel-sony-acx565akm.c:
479:9-17: WARNING: use scnprintf or sprintf

Use sysfs_emit instead of scnprintf or sprintf makes more sense.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Yang Guang <yang.guang5@zte.com.cn>
Signed-off-by: Helge Deller <deller@gmx.de>
  • Loading branch information
Yang Guang authored and hdeller committed Jan 29, 2022
1 parent 0a78659 commit 24565bc
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ static ssize_t show_cabc_available_modes(struct device *dev,
int i;

if (!ddata->has_cabc)
return snprintf(buf, PAGE_SIZE, "%s\n", cabc_modes[0]);
return sysfs_emit(buf, "%s\n", cabc_modes[0]);

for (i = 0, len = 0;
len < PAGE_SIZE && i < ARRAY_SIZE(cabc_modes); i++)
Expand Down

0 comments on commit 24565bc

Please sign in to comment.