From: Greg KH <gregkh@linuxfoundation.org>
To: Joe Perches <joe@perches.com>
Cc: Tejun Heo <tj@kernel.org>, LKML <linux-kernel@vger.kernel.org>,
Sangjung Woo <sangjung.woo@samsung.com>
Subject: Re: [RFC PATCH] device: Add kernel standard devm_k.alloc functions
Date: Tue, 8 Oct 2013 23:54:04 -0700 [thread overview]
Message-ID: <20131009065404.GA7005@kroah.com> (raw)
In-Reply-To: <1381299404.2040.19.camel@joe-AO722>
On Tue, Oct 08, 2013 at 11:16:44PM -0700, Joe Perches wrote:
> On Tue, 2013-10-08 at 22:43 -0700, Greg KH wrote:
> > On Tue, Oct 08, 2013 at 10:32:27PM -0700, Joe Perches wrote:
> > > Currently, devm_ managed memory only supports kzalloc.
> > >
> > > Convert the devm_kzalloc implementation to devm_kmalloc
> > > and remove the complete memset to 0 but still set the
> > > initial struct devres header and whatever padding before
> > > data to 0.
> > >
> > > Add the other normal alloc variants as static inlines with
> > > __GFP_ZERO added to the gfp flag where appropriate:
> > >
> > > devm_kzalloc
> > > devm_kcalloc
> > > devm_kmalloc_array
> > >
> > > Add gfp.h to device.h for the newly added static inlines.
> > >
> > > Signed-off-by: Joe Perches <joe@perches.com>
> > > ---
> > > drivers/base/devres.c | 27 ++++++++++++++++-----------
> > > include/linux/device.h | 21 +++++++++++++++++++--
> > > 2 files changed, 35 insertions(+), 13 deletions(-)
> >
> > Makes sense to me, does this let other drivers start to use this where
> > they were not able to in the past?
>
> Yes.
>
> There are some existing uses of devm_kzalloc(dev, n*size, gfp)
> that could/should be converted.
Ok, great, want me to take the "RFC" off of this and apply it to my
tree?
greg k-h
next prev parent reply other threads:[~2013-10-09 6:58 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-09 5:32 [RFC PATCH] device: Add kernel standard devm_k.alloc functions Joe Perches
2013-10-09 5:43 ` Greg KH
2013-10-09 6:16 ` Joe Perches
2013-10-09 6:54 ` Greg KH [this message]
2013-10-09 7:04 ` Joe Perches
2013-10-09 16:30 ` Tejun Heo
2013-10-09 17:49 ` Joe Perches
2013-10-11 20:11 ` Andrew Morton
2013-10-18 16:57 ` Kevin Hilman
2013-10-18 16:57 ` Kevin Hilman
2013-10-18 17:04 ` Kevin Hilman
2013-10-18 17:04 ` Kevin Hilman
2013-10-18 22:57 ` Greg KH
2013-10-18 22:57 ` Greg KH
2013-10-19 5:52 ` Kevin Hilman
2013-10-19 5:52 ` Kevin Hilman
2013-10-20 2:57 ` Greg KH
2013-10-20 2:57 ` Greg KH
2013-10-20 15:22 ` Joe Perches
2013-10-20 15:22 ` Joe Perches
2013-10-25 12:59 ` Olof Johansson
2013-10-25 12:59 ` Olof Johansson
2013-10-25 15:23 ` Greg KH
2013-10-25 15:23 ` Greg KH
2013-10-18 17:06 ` Joe Perches
2013-10-18 17:06 ` Joe Perches
2013-10-18 17:11 ` Kevin Hilman
2013-10-18 17:11 ` Kevin Hilman
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=20131009065404.GA7005@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sangjung.woo@samsung.com \
--cc=tj@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.