From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753091AbbJNJAf (ORCPT ); Wed, 14 Oct 2015 05:00:35 -0400 Received: from mout.kundenserver.de ([212.227.17.24]:54136 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752982AbbJNJA3 (ORCPT ); Wed, 14 Oct 2015 05:00:29 -0400 From: Arnd Bergmann To: linux-arm-kernel@lists.infradead.org Cc: Peter Zijlstra , Liam Girdwood , linux-kernel@vger.kernel.org, Mark Brown , akpm@linux-foundation.org, Ingo Molnar Subject: Re: [PATCH] mutex: make mutex_lock_nested an inline function Date: Wed, 14 Oct 2015 11:00:20 +0200 Message-ID: <11240940.NHO2vFoJOz@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <20151014083707.GR11639@twins.programming.kicks-ass.net> References: <11282238.AHmyWliPRj@wuerfel> <20151014082050.GQ17308@twins.programming.kicks-ass.net> <20151014083707.GR11639@twins.programming.kicks-ass.net> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:Emt453I8L53hB1a0v5zDl412p5n/d1gUsMBrFZcJOHets2bkJgT M/peRN5FD8YD93nh9hCr6cIdWBl5So4Iyi5OUKOE8JzuSAxdauDLfFb/oWLTNJ34YusXXB/ iT00lJfup8IEtaXCFJrv12kUzcZMg6FtNzr9znIRduH+Vs2nX/UK+iRnU9beB3GbwaY735M lfyJywq44m6iq1LOSFEbg== X-UI-Out-Filterresults: notjunk:1;V01:K0:e2cNUOhCdWY=:Ur2Mt2hxIvnhzKZk1wv0bt VeyUVjx6eDO0P3qiPC8uKJ8r5Mq/DOh+wK/TA29C9Rj703zcFXXj5iZEv079FF3VkacD3RT2q RJIwQHWO9DxPbwlv9KCligIlAP/8mNLXSeMkK+f4toIPvjpBnXLvoI4QK3sQxLkhypZbjFShE 4YzZbNVjbGaIn3ka8CTptDJg0hAS4HMtw6BG/lDLs+bfRB4Zon4EwNYzgWPf2k40rUS8sWjbu THj4LSsrZT5g6RgVon00sB5tPuseLNVmFPAotSXNp5FYW/emcrQ4rqwM4sTE5VU9U8MeVZlaH Z2loRHTcZqp+Q5cT2cvmd8C8kVj9TuRoxVhcCEQ+tPlFoaH+yZvEFpo5yXhoKe1qGtFE1qlYz GBxPnyhQnetl8MitjcDhNpxfjtVYlgs4u6w/Pc5eQI9iuANMUUYbzgonqczAUVrk/SjkxUlHU 7brXRkJebVEJWHbPl0dvZTU9PozxufBFmPiFPVANKgVSGRtZRk0S4cA/LALuvxUAuq/SocET2 4mxhPIJWwshbrFH2LxRhXTY64Oifo+tb2UtwiqtfSJbxq6/moLXr7Js0pMYixK8a0fuisVl/q +UL5vsBJOl+E3Ke0alZn02PWrat/EwzPd0bAWpJHph0UJQCCZQftoMXmj9EW+PMJHugilJQv0 9XhVZYyNmPQwlbnYMSGsZoV0rVWd1p3Tp63xnX/1GV9rXVYaXAcIPx7mVP/+OZk44BFBFTLjq Rvpu1jrGT1/WFcQY Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wednesday 14 October 2015 10:37:07 Peter Zijlstra wrote: > On Wed, Oct 14, 2015 at 10:20:50AM +0200, Peter Zijlstra wrote: > > > > On Tue, Oct 13, 2015 at 10:30:08PM +0200, Arnd Bergmann wrote: > > > > > The second argument of the mutex_lock_nested() helper is only > > > > > evaluated if CONFIG_DEBUG_LOCK_ALLOC is set. Otherwise we > > > > > get this build warning for the new regulator_lock_supply > > > > > function: > > > > > > > > > > drivers/regulator/core.c: In function 'regulator_lock_supply': > > > > > drivers/regulator/core.c:142:6: warning: unused variable 'i' [-Wunused-variable] > > > > > > > > > > To avoid the warning, this patch changes the definition of > > > > > mutex_lock_nested() to be static inline function rather than > > > > > a macro, which tells gcc that the variable is potentially > > > > > used. > > > > Uuh, I just looked at next and saw this regulator_lock_supply() > > function. How is that limited? subclass must be <8 otherwise bad things > > happen. > > Also, the function appears unused, just delete it That was my first suggestion as well when I ran into drivers/regulator/core.c:139:13: warning: 'regulator_lock_supply' defined but not used but apparently this is work-in-progress and the plan is to use it in 4.4 when the rest of the currently-under-review patches are merged. Arnd