Re: [PATCH 1/3] livepatch: Add force sysfs attribute

From: Miroslav Benes
Date: Thu May 18 2017 - 09:20:51 EST


On Thu, 18 May 2017, Libor Pechacek wrote:

> On Thu 18-05-17 14:00:41, Miroslav Benes wrote:
> >
> > + pr_info("no patching in progress. Force not allowed\n");
>
> proposing smoother wording and information sharing
> pr_info("no patching in progress, forced action (%d) ineffective", val);

That is better. Thanks.

> > + return -EINVAL;
> > + }
> > +
> > + switch (val) {
>
> I felt strong confusion for a while looking at a function what does nothing. A
> comment that this is intentionally an empty shell, at this stage, would be
> welcome.

Yes, I wanted to keep that sysfs glue separate from both implementations
to make the review easier. Despite the ugly outcome. And it is confusing.

Comment sounds good.

Thanks,
Miroslav

> > + default:
> > + return -EINVAL;
> > + }
> > +
> > + return count;
> > +}