Skip to content

Commit

Permalink
Fonts: Make font size unsigned in font_desc
Browse files Browse the repository at this point in the history
commit 7cb4150 upstream.

`width` and `height` are defined as unsigned in our UAPI font descriptor
`struct console_font`. Make them unsigned in our kernel font descriptor
`struct font_desc`, too.

Also, change the corresponding printk() format identifiers from `%d` to
`%u`, in sti_select_fbfont().

Signed-off-by: Peilin Ye <yepeilin.cs@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20201028105647.1210161-1-yepeilin.cs@gmail.com
Cc: Helge Deller <deller@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
ypl-coffee authored and gregkh committed Jun 9, 2022
1 parent c5b9b7f commit 78e008d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/video/console/sticore.c
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ sti_select_fbfont(struct sti_cooked_rom *cooked_rom, const char *fbfont_name)
if (!fbfont)
return NULL;

pr_info("STI selected %dx%d framebuffer font %s for sticon\n",
pr_info("STI selected %ux%u framebuffer font %s for sticon\n",
fbfont->width, fbfont->height, fbfont->name);

bpc = ((fbfont->width+7)/8) * fbfont->height;
Expand Down
2 changes: 1 addition & 1 deletion include/linux/font.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
struct font_desc {
int idx;
const char *name;
int width, height;
unsigned int width, height;
const void *data;
int pref;
};
Expand Down

0 comments on commit 78e008d

Please sign in to comment.