Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754521AbbK3S60 (ORCPT ); Mon, 30 Nov 2015 13:58:26 -0500 Received: from hotel311.server4you.de ([85.25.146.15]:59224 "EHLO hotel311.server4you.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754435AbbK3S6M (ORCPT ); Mon, 30 Nov 2015 13:58:12 -0500 X-Greylist: delayed 349 seconds by postgrey-1.27 at vger.kernel.org; Mon, 30 Nov 2015 13:58:11 EST Subject: Re: [PATCH tip v5 2/5] kbuild: Add option to turn incompatible pointer check into error To: paulmck@linux.vnet.ibm.com, Daniel Wagner References: <1448890711-5812-1-git-send-email-daniel.wagner@bmw-carit.de> <1448890711-5812-3-git-send-email-daniel.wagner@bmw-carit.de> <565C6A8B.8080103@bmw-carit.de> <20151130173842.GV26643@linux.vnet.ibm.com> Cc: linux-kernel@vger.kernel.org, linux-rt-users@vger.kernel.org, Thomas Gleixner , Peter Zijlstra , linux-kbuild@vger.kernel.org, Marcelo Tosatti , Paolo Bonzini , Paul Gortmaker , Steven Rostedt , Boqun Feng From: Daniel Wagner Message-ID: <565C9AE2.7040408@monom.org> Date: Mon, 30 Nov 2015 19:52:18 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <20151130173842.GV26643@linux.vnet.ibm.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2042 Lines: 43 Hi Paul, On 11/30/2015 06:38 PM, Paul E. McKenney wrote: > On Mon, Nov 30, 2015 at 04:26:03PM +0100, Daniel Wagner wrote: >> On 11/30/2015 02:38 PM, Daniel Wagner wrote: >>> With the introduction of the simple wait API we have two very >>> similar APIs in the kernel. For example wake_up() and swake_up() >>> is only one character away. Although the compiler will warn >>> happily the wrong usage it keeps on going an even links the kernel. >>> Thomas and Peter would rather like to see early missuses reported >>> as error early on. >>> >>> In a first attempt we tried to wrap all swait and wait calls >>> into a macro which has an compile time type assertion. The result >>> was pretty ugly and wasn't able to catch all wrong usages. >>> woken_wake_function(), autoremove_wake_function() and wake_bit_function() >>> are assigned as function pointers. Wrapping them with a macro around is >>> not possible. Prefixing them with '_' was also not a real option >>> because there some users in the kernel which do use them as well. >>> All in all this attempt looked to intrusive and too ugly. >>> >>> An alternative is to turn the pointer type check into an error which >>> catches wrong type uses. Obviously not only the swait/wait ones. That >>> isn't a bad thing either. Though for the beginning let's introduce it >>> as options in the kernel hacking section. >> >> The kbuild bot found one problem for allmodconfig. I just send a fix for >> it ("regmap: Fix leftover from struct reg_default to struct reg_sequence >> change"). > > This will result in an updated series, correct? Not necessarily. This patch just points very verbose the incorrect pointer usage in regmap_register_path() users with allmodconfig. This series itself should be okay (unless I missed something). cheers, daniel -- 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/