lkml.org 
[lkml]   [2021]   [Dec]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] mfd: dln2: Switch to kvfree_rcu() API
On Thu, Dec 16, 2021 at 6:02 PM Lee Jones <lee.jones@linaro.org> wrote:
>
> On Wed, 15 Dec 2021, Uladzislau Rezki wrote:
>
> > On Wed, Dec 15, 2021 at 12:18:41PM +0100, Uladzislau Rezki (Sony) wrote:
> > > Instead of invoking a synchronize_rcu() to free a pointer
> > > after a grace period we can directly make use of new API
> > > that does the same but in more efficient way.
> > >
> > > TO: Lee Jones <lee.jones@linaro.org>
> > > TO: Mike Marciniszyn <mike.marciniszyn@cornelisnetworks.com>
> > > Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
> > > ---
> > > drivers/mfd/dln2.c | 6 ++----
> > > 1 file changed, 2 insertions(+), 4 deletions(-)
> > >
> > > diff --git a/drivers/mfd/dln2.c b/drivers/mfd/dln2.c
> > > index 852129ea0766..365e3e77cac4 100644
> > > --- a/drivers/mfd/dln2.c
> > > +++ b/drivers/mfd/dln2.c
> > > @@ -179,10 +179,8 @@ void dln2_unregister_event_cb(struct platform_device *pdev, u16 id)
> > >
> > > spin_unlock_irqrestore(&dln2->event_cb_lock, flags);
> > >
> > > - if (found) {
> > > - synchronize_rcu();
> > > - kfree(i);
> > > - }
> > > + if (found)
> > > + kvfree_rcu(i);
> > > }
> > > EXPORT_SYMBOL(dln2_unregister_event_cb);
> > >
> > + Lee Jones <lee.jones@linaro.org>
> > + Mike Marciniszyn <mike.marciniszyn@cornelisnetworks.com>
>
> I can't do anything with this.
>
> Send it properly please.
>
I got. Will do.

Thanks!

--
Uladzislau Rezki

\
 
 \ /
  Last update: 2021-12-17 16:07    [W:0.050 / U:0.524 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site