Re: sched: Disallow sched_attr::sched_policy < 0

2014-06-03 Thread Linus Torvalds
On Tue, Jun 3, 2014 at 1:08 AM, Peter Zijlstra wrote: > > Once upon a time GCC also did warns like that, but my compiler is silent > :-( You should be happy. The gcc warnings were shit. Iirc, gcc literally at one point warned about things like unsigned int i; if (i < 5) because that's c

Re: sched: Disallow sched_attr::sched_policy < 0

2014-06-03 Thread Dave Jones
On Tue, Jun 03, 2014 at 10:47:18AM +0200, Richard Weinberger wrote: > Am 03.06.2014 10:32, schrieb Peter Zijlstra: > > On Tue, Jun 03, 2014 at 10:15:44AM +0200, Richard Weinberger wrote: > >>> Once upon a time GCC also did warns like that, but my compiler is silent > >>> :-( > > -Wtype-limit

Re: sched: Disallow sched_attr::sched_policy < 0

2014-06-03 Thread Richard Weinberger
Am 03.06.2014 10:32, schrieb Peter Zijlstra: > On Tue, Jun 03, 2014 at 10:15:44AM +0200, Richard Weinberger wrote: >>> Once upon a time GCC also did warns like that, but my compiler is silent >>> :-( -Wtype-limits is what you're looking for. /me currently builds some kernel configs to find out ho

Re: sched: Disallow sched_attr::sched_policy < 0

2014-06-03 Thread Peter Zijlstra
On Tue, Jun 03, 2014 at 10:15:44AM +0200, Richard Weinberger wrote: > > Once upon a time GCC also did warns like that, but my compiler is silent > > :-( > > > > Yes, that needs fixing.. > > I sent already a patch for that... I found it.. thanks again :-) pgp6QZgoml9Yv.pgp Description: PGP signa

Re: sched: Disallow sched_attr::sched_policy < 0

2014-06-03 Thread Richard Weinberger
On Tue, Jun 3, 2014 at 10:08 AM, Peter Zijlstra wrote: > On Mon, Jun 02, 2014 at 04:22:04PM -0400, Dave Jones wrote: >> On Mon, Jun 02, 2014 at 02:13:19AM +, Linux Kernel wrote: >> >> > sched: Disallow sched_attr::sched_policy < 0 >> > >> > The scheduler uses policy=-1 to preserve t

Re: sched: Disallow sched_attr::sched_policy < 0

2014-06-03 Thread Peter Zijlstra
On Mon, Jun 02, 2014 at 04:22:04PM -0400, Dave Jones wrote: > On Mon, Jun 02, 2014 at 02:13:19AM +, Linux Kernel wrote: > > > sched: Disallow sched_attr::sched_policy < 0 > > > > The scheduler uses policy=-1 to preserve the current policy state to > > implement sys_sched_

Re: sched: Disallow sched_attr::sched_policy < 0

2014-06-02 Thread Dave Jones
On Mon, Jun 02, 2014 at 02:13:19AM +, Linux Kernel wrote: > sched: Disallow sched_attr::sched_policy < 0 > > The scheduler uses policy=-1 to preserve the current policy state to > implement sys_sched_setparam(), this got exposed to userspace by > accident through sys