From: Sascha Hauer <s.hauer@pengutronix.de>
To: Du Huanpeng <u74147@gmail.com>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] fbconsole: move font variable into struct font_desc
Date: Mon, 9 Nov 2015 07:28:24 +0100 [thread overview]
Message-ID: <20151109062824.GQ8526@pengutronix.de> (raw)
In-Reply-To: <1446952576-2228-1-git-send-email-u74147@gmail.com>
On Sat, Nov 07, 2015 at 07:16:16PM -0800, Du Huanpeng wrote:
> replace font related variables with a struct pointer,
> font_desc.
>
> Signed-off-by: Du Huanpeng <u74147@gmail.com>
> ---
> drivers/video/fbconsole.c | 36 +++++++++++++++++-------------------
> 1 file changed, 17 insertions(+), 19 deletions(-)
>
> diff --git a/drivers/video/fbconsole.c b/drivers/video/fbconsole.c
> index b10503e..60f3c48 100644
> --- a/drivers/video/fbconsole.c
> +++ b/drivers/video/fbconsole.c
> @@ -22,8 +22,8 @@ struct fbc_priv {
> struct param_d *par_font;
> int par_font_val;
>
> - int font_width, font_height;
> - const u8 *fontdata;
> + const struct font_desc *font;
> +
> unsigned int cols, rows;
> unsigned int x, y; /* cursor position */
>
> @@ -97,7 +97,7 @@ static void drawchar(struct fbc_priv *priv, int x, int y, char c)
>
> buf = gui_screen_render_buffer(priv->sc);
>
> - inbuf = &priv->fontdata[c * priv->font_height];
> + inbuf = &priv->font->data[c * priv->font->height];
I replaced this with:
inbuf = priv->font->data + c * priv->font->height;
Otherwise we get:
drivers/video/fbconsole.c:100:27: warning: dereferencing 'void *' pointer
but otherwise: Applied, thanks
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2015-11-09 6:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-08 3:16 Du Huanpeng
2015-11-09 6:28 ` Sascha Hauer [this message]
2015-11-09 8:21 ` Du Huanpeng
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151109062824.GQ8526@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=u74147@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox