All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 1/3] driver core/platform: don't leak memory allocated for dma_mask
Date: Mon, 26 May 2014 19:30:46 +0000	[thread overview]
Message-ID: <20140526193046.GJ15585@mwanda> (raw)
In-Reply-To: <1401122483-31603-1-git-send-email-emilgoode@gmail.com>

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.

regards,
dan carpenter


WARNING: multiple messages have this Message-ID (diff)
From: dan.carpenter@oracle.com (Dan Carpenter)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/3] driver core/platform: don't leak memory allocated for dma_mask
Date: Mon, 26 May 2014 22:30:46 +0300	[thread overview]
Message-ID: <20140526193046.GJ15585@mwanda> (raw)
In-Reply-To: <1401122483-31603-1-git-send-email-emilgoode@gmail.com>

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.

regards,
dan carpenter

WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Emil Goode <emilgoode@gmail.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 22:30:46 +0300	[thread overview]
Message-ID: <20140526193046.GJ15585@mwanda> (raw)
In-Reply-To: <1401122483-31603-1-git-send-email-emilgoode@gmail.com>

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.

regards,
dan carpenter


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

Thread overview: 27+ 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 ` Emil Goode
2014-05-26 16:41 ` 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   ` Emil Goode
2014-05-26 16:41   ` 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:41   ` Emil Goode
2014-05-26 16:41   ` 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 16:51   ` Russell King - ARM Linux
2014-05-26 16:51   ` Russell King - ARM Linux
2014-05-26 18:31   ` Emil Goode
2014-05-26 18:31     ` Emil Goode
2014-05-26 18:31     ` Emil Goode
2014-05-26 18:14 ` Uwe Kleine-König
2014-05-26 18:14   ` Uwe Kleine-König
2014-05-26 18:14   ` Uwe Kleine-König
2014-05-26 19:14 ` Yann Droneaud
2014-05-26 19:14   ` Yann Droneaud
2014-05-26 19:14   ` Yann Droneaud
2014-05-26 19:30 ` Dan Carpenter [this message]
2014-05-26 19:30   ` Dan Carpenter
2014-05-26 19:30   ` Dan Carpenter
2014-05-26 19:40   ` Emil Goode
2014-05-26 19:40     ` Emil Goode
2014-05-26 19:40     ` Emil Goode

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=20140526193046.GJ15585@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=linux-arm-kernel@lists.infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.