Re: [patch V2 01/29] tracing: Cleanup stack trace code

From: Thomas Gleixner
Date: Thu Apr 18 2019 - 18:45:01 EST


On Thu, 18 Apr 2019, Steven Rostedt wrote:
> On Thu, 18 Apr 2019 10:41:20 +0200
> Thomas Gleixner <tglx@xxxxxxxxxxxxx> wrote:
>
> > @@ -412,23 +404,20 @@ stack_trace_sysctl(struct ctl_table *tab
> > void __user *buffer, size_t *lenp,
> > loff_t *ppos)
> > {
> > - int ret;
> > + int ret, was_enabled;
>
> One small nit. Could this be:
>
> int was_enabled;
> int ret;
>
> I prefer only joining variables that are related on the same line.
> Makes it look cleaner IMO.

If you wish so. To me it's waste of screen space :)

> >
> > mutex_lock(&stack_sysctl_mutex);
> > + was_enabled = !!stack_tracer_enabled;
> >
>
> Bah, not sure why I didn't do it this way to begin with. I think I
> copied something else that couldn't do it this way for some reason and
> didn't put any brain power behind the copy. :-/ But that was back in
> 2008 so I blame it on being "young and stupid" ;-)

The young part is gone for sure :)

> Other then the above nit and removing the unneeded +1 in max_entries:

s/+1/-1/

Thanks,

tglx