From: Sascha Hauer <s.hauer@pengutronix.de>
To: Daniel Mierswa <impulze@impulze.org>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 4/4] video/imx: always initialize offscreenbuf member
Date: Thu, 17 Jan 2013 18:55:11 +0100 [thread overview]
Message-ID: <20130117175511.GD1906@pengutronix.de> (raw)
In-Reply-To: <50F7F6D6.8080008@impulze.org>
On Thu, Jan 17, 2013 at 02:04:22PM +0100, Daniel Mierswa wrote:
> On 01/17/2013 12:56 PM, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > On 07:32 Thu 17 Jan , Daniel Mierswa wrote:
> >> + /*
> >> + * sc.offscreenbuf is dangling here, if no offscreen buffer was
> >> + * requested, so set it to NULL otherwise the free in fd_close
> >> + * will cause undefined behaviour
> >> + */
> >> + if (!offscreen)
> >> + sc.offscreenbuf = NULL;
> >> +
> > NAck
> >
> > this is already done by memset
> >
> > Best Regards,
> > J.
> >> if (sc.offscreenbuf) {
> >> if (do_bg)
> >> memset_pixel(&info, sc.offscreenbuf, bg_color,
>
> Huh? I don't get it.
sc is initialized to 0 in do_splash:
memset(&s, 0, sizeof(s));
memset(&sc, 0, sizeof(sc));
memset(&info, 0, sizeof(info));
so sc.offscreenbuf = NULL is a no-op.
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:[~2013-01-17 17:55 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-17 6:32 [RESEND PATCH] framebuffer work (especially i.MX) Daniel Mierswa
2013-01-17 6:32 ` [PATCH 1/4] i.MX21: Add periph. clock register name macros Daniel Mierswa
2013-01-17 6:32 ` [PATCH 2/4] i.MX21/27: don't enable lcd bus clocks too early Daniel Mierswa
2013-01-17 6:32 ` [PATCH 3/4] i.MX27: fix shift amount for PCCR1_PERCLK3_EN Daniel Mierswa
2013-01-17 6:32 ` [PATCH 4/4] video/imx: always initialize offscreenbuf member Daniel Mierswa
2013-01-17 11:56 ` Jean-Christophe PLAGNIOL-VILLARD
2013-01-17 13:04 ` Daniel Mierswa
2013-01-17 17:55 ` Sascha Hauer [this message]
2013-01-18 4:24 ` Daniel Mierswa
2013-01-18 10:23 ` [RESEND PATCH] framebuffer work (especially i.MX) Sascha Hauer
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=20130117175511.GD1906@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=impulze@impulze.org \
/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