From: Peilin Ye Date: Wed, 28 Oct 2020 10:56:47 +0000 (-0400) Subject: Fonts: Make font size unsigned in font_desc X-Git-Tag: accepted/tizen/unified/20230118.172025~6402^2~28^2~1558 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7cb415003468d41aecd6877ae088c38f6c0fc174;p=platform%2Fkernel%2Flinux-rpi.git 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 Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20201028105647.1210161-1-yepeilin.cs@gmail.com --- diff --git a/drivers/video/console/sticore.c b/drivers/video/console/sticore.c index 84c3ca3..fade32a 100644 --- a/drivers/video/console/sticore.c +++ b/drivers/video/console/sticore.c @@ -506,7 +506,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; diff --git a/include/linux/font.h b/include/linux/font.h index 4a3f874..b7214d7 100644 --- a/include/linux/font.h +++ b/include/linux/font.h @@ -16,7 +16,7 @@ struct font_desc { int idx; const char *name; - int width, height; + unsigned int width, height; const void *data; int pref; };