Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754761AbaFCNQs (ORCPT ); Tue, 3 Jun 2014 09:16:48 -0400 Received: from mx1.redhat.com ([209.132.183.28]:25931 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754728AbaFCNQq (ORCPT ); Tue, 3 Jun 2014 09:16:46 -0400 Date: Tue, 3 Jun 2014 09:16:09 -0400 From: Dave Jones To: Richard Weinberger Cc: Peter Zijlstra , Linux Kernel Mailing List , Michael Kerrisk-manpages , Linus Torvalds , Ingo Molnar Subject: Re: sched: Disallow sched_attr::sched_policy < 0 Message-ID: <20140603131609.GA26267@redhat.com> Mail-Followup-To: Dave Jones , Richard Weinberger , Peter Zijlstra , Linux Kernel Mailing List , Michael Kerrisk-manpages , Linus Torvalds , Ingo Molnar References: <20140602021319.9A5F9660C19@gitolite.kernel.org> <20140602202204.GA26649@redhat.com> <20140603080826.GK11096@twins.programming.kicks-ass.net> <20140603083228.GN11096@twins.programming.kicks-ass.net> <538D8B96.7080503@nod.at> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <538D8B96.7080503@nod.at> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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-limits is what you're looking for. > > /me currently builds some kernel configs to find out how much noise it triggers... Probably quite a bit I'd bet. There's a load of similar bugs in coverity's db. Some of them look benign, and are probably there just in case someone ever changes the type of a var, but it's non-obvious sometimes if the values a function receives can ever actually be < 0 Dave -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/