Skip to content

Commit 7cb4150

Browse files
peilin-yedanvet
authored andcommitted
Fonts: Make font size unsigned in font_desc
`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 <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent e000650 commit 7cb4150

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

drivers/video/console/sticore.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,7 @@ sti_select_fbfont(struct sti_cooked_rom *cooked_rom, const char *fbfont_name)
506506
if (!fbfont)
507507
return NULL;
508508

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

512512
bpc = ((fbfont->width+7)/8) * fbfont->height;

include/linux/font.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
struct font_desc {
1717
int idx;
1818
const char *name;
19-
int width, height;
19+
unsigned int width, height;
2020
const void *data;
2121
int pref;
2222
};

0 commit comments

Comments
 (0)