Re: [PATCH] sched/deadline: Use bools for the state flags

2017-11-21 Thread Linus Torvalds
On Tue, Nov 21, 2017 at 1:43 AM, Jiri Kosina wrote: > > Surely that works as well. I chose bool as that's in line with the actual > semantics, but I can of course resend with unsigned type if that's > preferred for one reason or another. As others have already said, please don't use "bool" in str

Re: [PATCH] sched/deadline: Use bools for the state flags

2017-11-21 Thread Peter Zijlstra
On Tue, Nov 21, 2017 at 11:44:05AM +0100, Jiri Kosina wrote: > --- a/include/linux/sched.h > +++ b/include/linux/sched.h > @@ -473,10 +473,10 @@ struct sched_dl_entity { >* conditions between the inactive timer handler and the wakeup >* code. >*/ > - int

Re: [PATCH] sched/deadline: Use bools for the state flags

2017-11-21 Thread Steven Rostedt
On Tue, 21 Nov 2017 12:43:53 +0100 (CET) Jiri Kosina wrote: > On Tue, 21 Nov 2017, Thomas Gleixner wrote: > > > > Commit > > > > > > 799ba82de01e ("sched/deadline: Use C bitfields for the state flags") > > > > > > converted state flags into one-bit signed int. Signed one-bit type can be > >

Re: [PATCH] sched/deadline: Use bools for the state flags

2017-11-21 Thread Jiri Kosina
On Tue, 21 Nov 2017, Thomas Gleixner wrote: > > Commit > > > > 799ba82de01e ("sched/deadline: Use C bitfields for the state flags") > > > > converted state flags into one-bit signed int. Signed one-bit type can be > > either 0 or -1, which is going to cause a problem once 1 is assigned to i

Re: [PATCH] sched/deadline: Use bools for the state flags

2017-11-21 Thread Luca Abeni
Hello, On Tue, 21 Nov 2017 11:44:05 +0100 (CET) Jiri Kosina wrote: > From: Jiri Kosina > > Commit > > 799ba82de01e ("sched/deadline: Use C bitfields for the state flags") > > converted state flags into one-bit signed int. Signed one-bit type can be > either 0 or -1, which is going to

Re: [PATCH] sched/deadline: Use bools for the state flags

2017-11-21 Thread Thomas Gleixner
On Tue, 21 Nov 2017, Jiri Kosina wrote: > From: Jiri Kosina > > Commit > > 799ba82de01e ("sched/deadline: Use C bitfields for the state flags") > > converted state flags into one-bit signed int. Signed one-bit type can be > either 0 or -1, which is going to cause a problem once 1 is ass

[PATCH] sched/deadline: Use bools for the state flags

2017-11-21 Thread Jiri Kosina
From: Jiri Kosina Commit 799ba82de01e ("sched/deadline: Use C bitfields for the state flags") converted state flags into one-bit signed int. Signed one-bit type can be either 0 or -1, which is going to cause a problem once 1 is assigned to it and then the value later tested against 1.