Re: [PATCH v4 5/6] console: Introduce ->exit() callback

From: Sergey Senozhatsky
Date: Fri Jan 31 2020 - 20:09:32 EST


On (20/01/31 13:27), Andy Shevchenko wrote:
[..]
> >
> > I would probably push it a bit further (I posted this snippet in another
> > thread). If console is not on the list then there is nothing for us to do
> > and sysfs notify is pointless.
>
> I didn't see post in the other thread, but I suppose that this snipped is
> for patch 4 in the series, correct?

No worries! Yes, for v4.

[..]
> > - if (!res && console->exit)
> > + if (console->exit)
>
> > console->exit(console);
> >
> > return res;
>
> ...then something like
>
> return console->exit(console);
>
> return 0;
>
> ...or...
>
> res = console->exit(console);
>
> Which one is preferable?

I don't really have preferences here, so up to you guys.

-ss