From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752928AbbJNIVB (ORCPT ); Wed, 14 Oct 2015 04:21:01 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:41502 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752855AbbJNIU4 (ORCPT ); Wed, 14 Oct 2015 04:20:56 -0400 Date: Wed, 14 Oct 2015 10:20:50 +0200 From: Peter Zijlstra To: Arnd Bergmann Cc: Ingo Molnar , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Mark Brown , Liam Girdwood , akpm@linux-foundation.org Subject: Re: [PATCH] mutex: make mutex_lock_nested an inline function Message-ID: <20151014082050.GQ17308@twins.programming.kicks-ass.net> References: <11282238.AHmyWliPRj@wuerfel> <20151013203812.GM17308@twins.programming.kicks-ass.net> <11817958.z9KtmeKzV7@wuerfel> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <11817958.z9KtmeKzV7@wuerfel> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > 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.