linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: aaro.koskinen@nokia.com
Cc: linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org
Subject: RE: [PATCH 8/8] OMAP: DSS2: OMAPFB: Reduce stack usage
Date: Wed, 11 May 2011 06:11:05 +0000	[thread overview]
Message-ID: <1305094265.2097.0.camel@deskari> (raw)
In-Reply-To: <CA1B555B4D79E3448D96A7C9847C7D9805EFB4C7@008-AM1MPN1-031.mgdnok.nokia.com>

On Tue, 2011-05-10 at 19:08 +0000, aaro.koskinen@nokia.com wrote:
> Hi,
> 
> Tomi Valkeinen [tomi.valkeinen@ti.com]:
> > omapfb_mode_to_timings() had struct fb_info, struct fb_var and struct
> > fb_ops allocated from stack. This caused the stack usage grow quite
> > high.
> >
> > Use kzalloc to allocate the structs instead.
> 
> [...]
> 
> > +       fbi = kzalloc(sizeof(*fbi), GFP_KERNEL);
> > +       var = kzalloc(sizeof(*var), GFP_KERNEL);
> > +       fbops = kzalloc(sizeof(*fbops), GFP_KERNEL);
> > +       fbi->fbops = fbops;
> 
> You should check and prepare for allocation failures.

So I should. Thanks!

 Tomi



  reply	other threads:[~2011-05-11  6:11 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-10 16:24 [PATCH 0/8] OMAP: DSS2: Miscellaneous patches Tomi Valkeinen
2011-05-10 16:24 ` [PATCH 1/8] OMAP: DSS2: Add missing dummy functions Tomi Valkeinen
2011-05-10 16:24 ` [PATCH 2/8] OMAPFB: fix wrong clock aliases and device name Tomi Valkeinen
2011-05-10 16:24 ` [PATCH 3/8] OMAP: DSS2: RFBI: add rfbi_bus_lock Tomi Valkeinen
2011-05-10 16:24 ` [PATCH 4/8] OMAP: DSS2: RFIB: clock enable/disable changes Tomi Valkeinen
2011-05-10 16:24 ` [PATCH 5/8] OMAP: DSS2: RFBI: add omap_rfbi_configure Tomi Valkeinen
2011-05-10 16:24 ` [PATCH 6/8] OMAP: DSS2: RFIB: cleanup Tomi Valkeinen
2011-05-10 16:24 ` [PATCH 7/8] OMAP: DSS2: OMAPFB: remove dead code Tomi Valkeinen
2011-05-10 16:24 ` [PATCH 8/8] OMAP: DSS2: OMAPFB: Reduce stack usage Tomi Valkeinen
2011-05-10 19:08   ` aaro.koskinen
2011-05-11  6:11     ` Tomi Valkeinen [this message]
2011-05-11  3:50   ` Janorkar, Mayuresh
2011-05-11  3:57 ` [PATCH 0/8] OMAP: DSS2: Miscellaneous patches Janorkar, Mayuresh
2011-05-11  6:12   ` Tomi Valkeinen

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=1305094265.2097.0.camel@deskari \
    --to=tomi.valkeinen@ti.com \
    --cc=aaro.koskinen@nokia.com \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-omap@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).