Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755178AbbK0UKw (ORCPT ); Fri, 27 Nov 2015 15:10:52 -0500 Received: from www.linutronix.de ([62.245.132.108]:45304 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754234AbbK0UKs (ORCPT ); Fri, 27 Nov 2015 15:10:48 -0500 Date: Fri, 27 Nov 2015 21:10:00 +0100 (CET) From: Thomas Gleixner To: Daniel Wagner cc: linux-kernel@vger.kernel.org, linux-rt-users@vger.kernel.org, Boqun Feng , Marcelo Tosatti , Paolo Bonzini , "Paul E. McKenney" , Paul Gortmaker , "Peter Zijlstra (Intel)" Subject: Re: [PATCH tip v4 2/5] [s]wait: Add compile time type check assertion In-Reply-To: <5656F98D.70701@bmw-carit.de> Message-ID: References: <1448370187-10075-1-git-send-email-daniel.wagner@bmw-carit.de> <1448370187-10075-3-git-send-email-daniel.wagner@bmw-carit.de> <5656F98D.70701@bmw-carit.de> User-Agent: Alpine 2.11 (DEB 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1329 Lines: 35 On Thu, 26 Nov 2015, Daniel Wagner wrote: > On 11/24/2015 02:03 PM, Daniel Wagner wrote: > > The API provided by wait.h and swait.h is very similiar. Most of the > > time your are only one character away from either of it: > > > > wake_up() vs swake_up() > > > > This is on purpose so that we do not have two nearly identical bits of > > infrastructre code with dissimilar names. > > > > A compile time type check assertion ensures that obvious wrong usage > > is caught at early stage. > > Obviously, this didn't really work as one can see with patch #4. That > one just compiled. So I wrapped almost all functions to get a better > check coverage. woken_wake_function(), autoremove_wake_function() and > wake_bit_function() can't be wrapped easily because DEFINE_WAIT and > friends. I just left them out. > > The result looks pretty bad in my opinion. Probably it would be > better do add -Werror=incompatible-pointer-types to the CFLAGS. That's really bad. If we can pull off the -Werror=incompatible-pointer-types trick, that would solve it nicely. Thanks, tglx -- 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/