projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d8bb92e
)
fbcon: replace snprintf in show functions with sysfs_emit
author
Yang Guang
<yang.guang5@zte.com.cn>
Tue, 30 Nov 2021 00:05:08 +0000
(08:05 +0800)
committer
Helge Deller
<deller@gmx.de>
Thu, 14 Apr 2022 19:56:19 +0000
(21:56 +0200)
Use sysfs_emit instead of scnprintf or sprintf.
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>
Link:
https://patchwork.freedesktop.org/patch/msgid/0cb7ca73d9cd7162988a22a24cd18bbcd3d8bb27.1638156341.git.yang.guang5@zte.com.cn
drivers/video/fbdev/core/fbcon.c
patch
|
blob
|
history
diff --git
a/drivers/video/fbdev/core/fbcon.c
b/drivers/video/fbdev/core/fbcon.c
index 34744a16d41bbe871f3e56585bc2ee05f70ec887..c4e91715ef0063570381b1cac8366f47c9e160f0 100644
(file)
--- a/
drivers/video/fbdev/core/fbcon.c
+++ b/
drivers/video/fbdev/core/fbcon.c
@@
-3185,7
+3185,7
@@
static ssize_t show_rotate(struct device *device,
rotate = fbcon_get_rotate(info);
err:
console_unlock();
- return s
nprintf(buf, PAGE_SIZE
, "%d\n", rotate);
+ return s
ysfs_emit(buf
, "%d\n", rotate);
}
static ssize_t show_cursor_blink(struct device *device,
@@
-3210,7
+3210,7
@@
static ssize_t show_cursor_blink(struct device *device,
blink = delayed_work_pending(&ops->cursor_work);
err:
console_unlock();
- return s
nprintf(buf, PAGE_SIZE
, "%d\n", blink);
+ return s
ysfs_emit(buf
, "%d\n", blink);
}
static ssize_t store_cursor_blink(struct device *device,