All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Simek <monstr@monstr.eu>
To: Joe Perches <joe@perches.com>
Cc: Michal Simek <michal.simek@xilinx.com>,
	linux-kernel@vger.kernel.org, monstr@monstr.eu,
	Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>,
	Tomi Valkeinen <tomi.valkeinen@ti.com>,
	linux-fbdev@vger.kernel.org
Subject: Re: [PATCH v2 2/3] video: xilinxfb: Use devm_kzalloc instead of kzalloc
Date: Thu, 10 Oct 2013 06:24:19 +0000	[thread overview]
Message-ID: <52564813.5090006@monstr.eu> (raw)
In-Reply-To: <1381331583.2050.11.camel@joe-AO722>

[-- Attachment #1: Type: text/plain, Size: 1125 bytes --]

On 10/09/2013 05:13 PM, Joe Perches wrote:
> On Wed, 2013-10-09 at 12:52 +0200, Michal Simek wrote:
>> Simplify driver probe and release function.
> []
>> diff --git a/drivers/video/xilinxfb.c b/drivers/video/xilinxfb.c
> []
>> @@ -423,7 +419,7 @@ static int xilinxfb_of_probe(struct platform_device *pdev)
>>  	pdata = xilinx_fb_default_pdata;
>>
>>  	/* Allocate the driver data region */
>> -	drvdata = kzalloc(sizeof(*drvdata), GFP_KERNEL);
>> +	drvdata = devm_kzalloc(&pdev->dev, sizeof(*drvdata), GFP_KERNEL);
>>  	if (!drvdata) {
>>  		dev_err(&pdev->dev, "Couldn't allocate device private record\n");
> 
> Be nice to remove the unnecessary OOM message.
> There's already a generic dump_stack on OOM.

Ah yeah - this series was made before I knew this.
Will send v3.

Thanks,
Michal


-- 
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/
Maintainer of Linux kernel - Xilinx Zynq ARM architecture
Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 263 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Michal Simek <monstr@monstr.eu>
To: Joe Perches <joe@perches.com>
Cc: Michal Simek <michal.simek@xilinx.com>,
	linux-kernel@vger.kernel.org, monstr@monstr.eu,
	Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>,
	Tomi Valkeinen <tomi.valkeinen@ti.com>,
	linux-fbdev@vger.kernel.org
Subject: Re: [PATCH v2 2/3] video: xilinxfb: Use devm_kzalloc instead of kzalloc
Date: Thu, 10 Oct 2013 08:24:19 +0200	[thread overview]
Message-ID: <52564813.5090006@monstr.eu> (raw)
In-Reply-To: <1381331583.2050.11.camel@joe-AO722>

[-- Attachment #1: Type: text/plain, Size: 1125 bytes --]

On 10/09/2013 05:13 PM, Joe Perches wrote:
> On Wed, 2013-10-09 at 12:52 +0200, Michal Simek wrote:
>> Simplify driver probe and release function.
> []
>> diff --git a/drivers/video/xilinxfb.c b/drivers/video/xilinxfb.c
> []
>> @@ -423,7 +419,7 @@ static int xilinxfb_of_probe(struct platform_device *pdev)
>>  	pdata = xilinx_fb_default_pdata;
>>
>>  	/* Allocate the driver data region */
>> -	drvdata = kzalloc(sizeof(*drvdata), GFP_KERNEL);
>> +	drvdata = devm_kzalloc(&pdev->dev, sizeof(*drvdata), GFP_KERNEL);
>>  	if (!drvdata) {
>>  		dev_err(&pdev->dev, "Couldn't allocate device private record\n");
> 
> Be nice to remove the unnecessary OOM message.
> There's already a generic dump_stack on OOM.

Ah yeah - this series was made before I knew this.
Will send v3.

Thanks,
Michal


-- 
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/
Maintainer of Linux kernel - Xilinx Zynq ARM architecture
Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 263 bytes --]

  reply	other threads:[~2013-10-10  6:24 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-09 10:52 [PATCH v2 1/3] video: xilinxfb: Use standard variable name convention Michal Simek
2013-10-09 10:52 ` Michal Simek
2013-10-09 10:52 ` [PATCH v2 2/3] video: xilinxfb: Use devm_kzalloc instead of kzalloc Michal Simek
2013-10-09 10:52   ` Michal Simek
2013-10-09 15:13   ` Joe Perches
2013-10-09 15:13     ` Joe Perches
2013-10-10  6:24     ` Michal Simek [this message]
2013-10-10  6:24       ` Michal Simek
2013-10-09 10:52 ` [PATCH v2 3/3] video: xilinxfb: Simplify error path Michal Simek
2013-10-09 10:52   ` Michal Simek
     [not found] ` <631df9a44b366af4129d00f1d4e1d3baad7d4903.1381315928.git.michal.simek-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>
2013-10-09 11:06   ` [PATCH v2 1/3] video: xilinxfb: Use standard variable name convention Mark Rutland
2013-10-09 11:06     ` Mark Rutland
2013-10-09 11:06     ` Mark Rutland
     [not found]     ` <20131009110651.GH4981-NuALmloUBlrZROr8t4l/smS4ubULX0JqMm0uRHvK7Nw@public.gmane.org>
2013-10-09 11:18       ` Michal Simek
2013-10-09 11:18         ` Michal Simek
2013-10-09 11:18         ` Michal Simek

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=52564813.5090006@monstr.eu \
    --to=monstr@monstr.eu \
    --cc=joe@perches.com \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal.simek@xilinx.com \
    --cc=plagnioj@jcrosoft.com \
    --cc=tomi.valkeinen@ti.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 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.