All of lore.kernel.org
 help / color / mirror / Atom feed
From: Aneesh V <aneesh@ti.com>
To: "Cousson, Benoit" <b-cousson@ti.com>
Cc: linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org,
	akpm@linux-foundation.org
Subject: Re: [RFC PATCH 4/8] misc: emif: add basic infrastructure for EMIF driver
Date: Fri, 17 Feb 2012 20:57:14 +0530	[thread overview]
Message-ID: <4F3E71D2.5080306@ti.com> (raw)
In-Reply-To: <4F3E59CD.6050108@ti.com>

On Friday 17 February 2012 07:14 PM, Cousson, Benoit wrote:
> Hi Aneesh,

[...]

>>>> + emif = kzalloc(sizeof(struct emif_data), GFP_KERNEL);
>>>
>>> You should use the devm_* version of this API to get the simplify the
>>> error handling / removal.
>>
>> Please note that most of my allocations are happening through
>> kmemdup(). kmemdup() doesn't have a devm_* equivalent. So, I have a
>> cleanup() function and in the interest of uniformity decided to avoid
>> devm_* variants altogether.
>
> I think it still worth using devm_kzalloc + memcopy here instead of
> kmemdup to avoid the cleanup() and simplify as well the error handling.

I will do that.

>
> You might even propose a new devm_kmemdup API if you want.

Ok. I will attempt that, maybe both devm_kmalloc() and devm_kmemdup().
But I would like to de-couple that from this series. That is, I will do
the patch separately and if that gets up-streamed I will update EMIF
driver to use them. Until then I will go with what you suggested above.

br,
Aneesh

  reply	other threads:[~2012-02-17 15:27 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-04 12:16 [RFC PATCH 0/8] Add TI EMIF SDRAM controller driver Aneesh V
2012-02-04 12:16 ` [RFC PATCH 1/8] OMAP4: hwmod: add EMIF hw mod data Aneesh V
2012-02-16 10:02   ` Santosh Shilimkar
2012-02-16 10:27     ` Aneesh V
2012-02-04 12:16 ` [RFC PATCH 2/8] misc: ddr: add LPDDR2 data from JESD209-2 Aneesh V
2012-02-16 10:06   ` Santosh Shilimkar
2012-02-16 10:07   ` Santosh Shilimkar
2012-02-16 10:27     ` Aneesh V
2012-02-16 11:10       ` Alan Cox
2012-02-16 11:25         ` Shilimkar, Santosh
2012-02-16 11:55         ` Aneesh V
2012-02-04 12:16 ` [RFC PATCH 3/8] misc: emif: add register definitions for EMIF Aneesh V
2012-02-16 10:10   ` Santosh Shilimkar
2012-02-16 10:30     ` Aneesh V
2012-02-04 12:16 ` [RFC PATCH 4/8] misc: emif: add basic infrastructure for EMIF driver Aneesh V
2012-02-16 10:33   ` Santosh Shilimkar
2012-02-16 11:15     ` Aneesh V
2012-02-16 16:30   ` Cousson, Benoit
2012-02-16 16:30     ` Cousson, Benoit
2012-02-17 13:26     ` Aneesh V
2012-02-17 13:44       ` Cousson, Benoit
2012-02-17 13:44         ` Cousson, Benoit
2012-02-17 15:27         ` Aneesh V [this message]
2012-02-24 11:10     ` Aneesh V
2012-02-24 11:16       ` Cousson, Benoit
2012-02-24 11:16         ` Cousson, Benoit
2012-02-04 12:16 ` [RFC PATCH 5/8] misc: emif: handle frequency and voltage change events Aneesh V
2012-02-16 10:38   ` Santosh Shilimkar
2012-02-16 11:22     ` Aneesh V
2012-02-04 12:16 ` [RFC PATCH 6/8] misc: emif: add interrupt and temperature handling Aneesh V
2012-02-16 10:41   ` Santosh Shilimkar
2012-02-16 11:50     ` Aneesh V
2012-02-04 12:16 ` [RFC PATCH 7/8] misc: emif: add one-time settings Aneesh V
2012-02-16 10:44   ` Santosh Shilimkar
2012-02-16 11:56     ` Aneesh V
2012-02-04 12:16 ` [RFC PATCH 8/8] misc: emif: add debugfs entries for emif Aneesh V
2012-02-16 10:46   ` Santosh Shilimkar
2012-02-16 10:51 ` [RFC PATCH 0/8] Add TI EMIF SDRAM controller driver Santosh Shilimkar
2012-02-16 16:23   ` Greg KH
2012-02-17 13:56     ` Aneesh V
2012-02-17 17:50       ` Greg KH
2012-02-20 14:07         ` Aneesh V

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=4F3E71D2.5080306@ti.com \
    --to=aneesh@ti.com \
    --cc=akpm@linux-foundation.org \
    --cc=b-cousson@ti.com \
    --cc=linux-kernel@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 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.