lkml.org 
[lkml]   [2015]   [May]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v4 1/1] clkdev: change prototype of clk_register_clkdev()
From
Date
On Wed, 2015-05-06 at 13:51 +0100, Russell King - ARM Linux wrote:
> On Wed, May 06, 2015 at 03:34:09PM +0300, Andy Shevchenko wrote:
> > On Wed, 2015-05-06 at 12:09 +0100, Russell King - ARM Linux wrote:
> > > On Wed, May 06, 2015 at 01:24:12PM +0300, Andy Shevchenko wrote:
> > > > Since clk_register_clkdev() is exported for modules the caller should get a
> > > > pointer to the allocated resources. Otherwise the memory leak is guaranteed on
> > > > the ->remove() stage.
> > >
> > > clk_register_clkdev() is there to assist mass clock registrations, which
> > > typically happen in platform code. It's there to simplify the "I need
> > > to register this clock which I'm not going to release again".
> > >
> > > I don't see any of these locations trying to unregister their clk from
> > > clkdev, so I doubt this patch is needed.
> >
> > We are doing the driver which will use this (as I mentioned in the cover
> > letter).
> >
> > >
> > > Where a module wants to remove its clk from clkdev, it should register
> > > its clk with clkdev_create() and remove it with clkdev_drop().
> > >
> >
> > You are talking about something in the wild? I can't find
> > clkdev_create() neither in current clk.git nor in linux-next.git.
>
> It'll be in linux-next RSN.
>
> Search lakml for "Fix fallout from per-user struct clk patches"
>

Thanks, we will use it, though the documentation might say that there is
a risk of memory leak in case of usage clk_register_clkdev().

--
Andy Shevchenko <andriy.shevchenko@intel.com>
Intel Finland Oy



\
 
 \ /
  Last update: 2015-05-08 13:41    [W:0.071 / U:0.788 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site