public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: Yann Droneaud <ydroneaud@opteya.com>,
	linux-kernel@vger.kernel.org, kernel@pengutronix.de,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>
Subject: Re: [PATCHv2] driver core/platform: don't leak memory allocated for dma_mask
Date: Tue, 14 Jan 2014 10:02:04 -0800	[thread overview]
Message-ID: <20140114180204.GD27791@kroah.com> (raw)
In-Reply-To: <20140114103648.GT29475@pengutronix.de>

On Tue, Jan 14, 2014 at 11:36:48AM +0100, Uwe Kleine-König wrote:
> > I will try to get some figure on the number of platform_device
> > registered with a dmamask versus without a dmamask: adding the u64 to
> > all platform_object might cost more memory than the extra code (1 branch
> > and a function).
> Also take into account
> 
> 	sizeof(struct platform_object) + strlen(average device)
> 
> Before and after the change. ISTR that the first summand is ~300 (on
> ARM). With putting dma_mask unconditionally into platform_object this
> goes up by 8, IMHO that is OK.
> 
> In return you save that alignment hassle and both your patch and the
> resulting code become simpler.

Yes, please do it this way, it makes it more obvious as to exactly what
is going on, which is more valuable than trying to be "tricky" and save
a few bytes of ram or rom.

thanks,

greg k-h

  reply	other threads:[~2014-01-14 18:03 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-12 22:10 [PATCH] driver core/platform: don't leak memory allocated for dma_mask Yann Droneaud
2014-01-13 21:38 ` [PATCHv1] " Yann Droneaud
2014-01-13 22:56   ` Greg Kroah-Hartman
2014-01-14  7:18     ` [PATCHv2] " Yann Droneaud
2014-01-14  8:19       ` Uwe Kleine-König
2014-01-14  9:57         ` Yann Droneaud
2014-01-14 10:36           ` Uwe Kleine-König
2014-01-14 18:02             ` Greg Kroah-Hartman [this message]
2014-01-26 21:18               ` [PATCHv3] " Yann Droneaud
2014-01-27 10:05                 ` [PATCHv4] " Yann Droneaud
2014-02-07 23:20                   ` Greg Kroah-Hartman
2014-02-08 15:09                     ` Uwe Kleine-König
2014-02-09  7:47                       ` Yann Droneaud
2014-02-09  9:30                         ` Uwe Kleine-König
2014-02-15 19:39                           ` Greg Kroah-Hartman

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=20140114180204.GD27791@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=u.kleine-koenig@pengutronix.de \
    --cc=ydroneaud@opteya.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