diff options
author | Yang Guang <yang.guang5@zte.com.cn> | 2021-11-30 08:06:03 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-04-15 14:18:24 +0200 |
commit | 3856562e940cc2c6c2d88ebf75e4169d3fad2f57 (patch) | |
tree | b0dffc9b8e08325263099e0dcd8e0e5c57ff49a7 | |
parent | 53a2088a396cfa1da92690a1da289634cd73bf0d (diff) | |
download | linux-stable-3856562e940cc2c6c2d88ebf75e4169d3fad2f57.tar.gz linux-stable-3856562e940cc2c6c2d88ebf75e4169d3fad2f57.tar.bz2 linux-stable-3856562e940cc2c6c2d88ebf75e4169d3fad2f57.zip |
video: fbdev: omapfb: acx565akm: replace snprintf with sysfs_emit
[ Upstream commit 24565bc4115961db7ee64fcc7ad2a7437c0d0a49 ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r-- | drivers/video/fbdev/omap2/omapfb/displays/panel-sony-acx565akm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/video/fbdev/omap2/omapfb/displays/panel-sony-acx565akm.c b/drivers/video/fbdev/omap2/omapfb/displays/panel-sony-acx565akm.c index 1293515e4b16..0cbc5b9183f8 100644 --- a/drivers/video/fbdev/omap2/omapfb/displays/panel-sony-acx565akm.c +++ b/drivers/video/fbdev/omap2/omapfb/displays/panel-sony-acx565akm.c @@ -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++) |