public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Emil Goode <emilgoode@gmail.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
	"Yann Droneaud" <ydroneaud@opteya.com>,
	"Shawn Guo" <shawn.guo@freescale.com>,
	"Dmitry Torokhov" <dmitry.torokhov@gmail.com>,
	"Sascha Hauer" <kernel@pengutronix.de>,
	"Russell King" <linux@arm.linux.org.uk>,
	"Olof Johansson" <olof@lixom.net>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH 1/3] driver core/platform: don't leak memory allocated for dma_mask
Date: Mon, 26 May 2014 21:40:06 +0200	[thread overview]
Message-ID: <20140526194006.GB23964@lianli> (raw)
In-Reply-To: <20140526193046.GJ15585@mwanda>

Hello,

On Mon, May 26, 2014 at 10:30:46PM +0300, Dan Carpenter wrote:
> On Mon, May 26, 2014 at 06:41:21PM +0200, Emil Goode wrote:
> > diff --git a/drivers/base/platform.c b/drivers/base/platform.c
> > index 9e9227e..dd1fa07 100644
> > --- a/drivers/base/platform.c
> > +++ b/drivers/base/platform.c
> > @@ -166,6 +166,7 @@ EXPORT_SYMBOL_GPL(platform_add_devices);
> >  struct platform_object {
> >  	struct platform_device pdev;
> >  	char name[1];
> > +	u64 dma_mask;
> >  };
> 
> Heh.  No this doesn't work as patch #1.  You have to have name at the
> end of the struct.

Yes I missed that one, obviously the order is important here.

Best regards,

Emil Goode

      reply	other threads:[~2014-05-26 19:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-26 16:41 [PATCH 1/3] driver core/platform: don't leak memory allocated for dma_mask Emil Goode
2014-05-26 16:41 ` [PATCH 2/3] driver core/platform: make .name of struct platform_object a C99 flexible array Emil Goode
2014-05-26 16:41 ` [PATCH 3/3] ARM: imx: don't allocate memory for .dma_mask of struct device Emil Goode
2014-05-26 16:51 ` [PATCH 1/3] driver core/platform: don't leak memory allocated for dma_mask Russell King - ARM Linux
2014-05-26 18:31   ` Emil Goode
2014-05-26 18:14 ` Uwe Kleine-König
2014-05-26 19:14 ` Yann Droneaud
2014-05-26 19:30 ` Dan Carpenter
2014-05-26 19:40   ` Emil Goode [this message]

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=20140526194006.GB23964@lianli \
    --to=emilgoode@gmail.com \
    --cc=dan.carpenter@oracle.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=olof@lixom.net \
    --cc=shawn.guo@freescale.com \
    --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