lkml.org 
[lkml]   [2021]   [May]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v2 5/5] misc/pvpanic: Make 'pvpanic_probe()' resource managed
On Sat, May 22, 2021 at 1:06 PM Andy Shevchenko
<andy.shevchenko@gmail.com> wrote:
> On Sat, May 22, 2021 at 9:56 AM Christophe JAILLET
> <christophe.jaillet@wanadoo.fr> wrote:

Hmm... Couple of (minor) comments though.

> > Simplify code and turn 'pvpanic_probe()' into a managed resource version.
> > This simplify callers that don't need to do some clean-up on error in the

simplifies
errors

> > probe and on remove.
> >
> > Update pvpanic-mmio.c and pvpanic-pci.c accordingly.
> >
> > 'pvpanic_remove()' don't need to be exported anymore.
>
> LGTM, thanks!
> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
>
> > Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> > Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

...

> > +static void pvpanic_remove(void *param)
> > {
> > struct pvpanic_instance *pi_cur, *pi_next;
> > + struct pvpanic_instance *pi = param;

> > if (!pi)
> > return;

Looking at this I'm wondering why it's not a dead code.

--
With Best Regards,
Andy Shevchenko

\
 
 \ /
  Last update: 2021-05-22 12:10    [W:0.055 / U:1.908 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site