projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c634621
)
fbcon: use min() to make code cleaner
author
Changcheng Deng
<deng.changcheng@zte.com.cn>
Wed, 9 Feb 2022 08:48:10 +0000
(08:48 +0000)
committer
Helge Deller
<deller@gmx.de>
Tue, 12 Apr 2022 19:40:56 +0000
(21:40 +0200)
Use min() in order to make code cleaner.
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Changcheng Deng <deng.changcheng@zte.com.cn>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Helge Deller <deller@gmx.de>
Link:
https://patchwork.freedesktop.org/patch/msgid/20220209084810.1561184-1-deng.changcheng@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
6a7d470
..
c56dd2f
100644
(file)
--- a/
drivers/video/fbdev/core/fbcon.c
+++ b/
drivers/video/fbdev/core/fbcon.c
@@
-578,7
+578,7
@@
static void fbcon_prepare_logo(struct vc_data *vc, struct fb_info *info,
save = kmalloc(array3_size(logo_lines, new_cols, 2),
GFP_KERNEL);
if (save) {
- int i =
cols < new_cols ? cols : new_cols
;
+ int i =
min(cols, new_cols)
;
scr_memsetw(save, erase, array3_size(logo_lines, new_cols, 2));
r = q - step;
for (cnt = 0; cnt < logo_lines; cnt++, r += i)