From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752483AbbJMT2T (ORCPT ); Tue, 13 Oct 2015 15:28:19 -0400 Received: from mout.kundenserver.de ([212.227.126.131]:49940 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751594AbbJMT2S (ORCPT ); Tue, 13 Oct 2015 15:28:18 -0400 From: Arnd Bergmann To: Mark Brown Cc: Sascha Hauer , Liam Girdwood , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH] regulator: core: avoid unused variable warning Date: Tue, 13 Oct 2015 21:28:13 +0200 Message-ID: <6859029.WgxSIWq5Yi@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <20151012154231.GE4238@sirena.org.uk> References: <5130320.kXvB35QoYU@wuerfel> <20151012154231.GE4238@sirena.org.uk> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:3dohGvj91QsweBqGL5EP+WxDEJnpkIcR+KuGPzemIAu28tkRM45 aMWM0R5MaQFZmyWxEhUIFLZPx0JbUvwa4dx8DkXuHg+MRlxsQtz9Qffp1c6lx1XNvUK5vk7 cilD2/v7m3PT1wJEIel69xrRs7XVRWjl9buMplLMeTWJl7pKLVOvkhu5F+NuufKfBpMl0lS k91eZS9syIFyEyGFABzQw== X-UI-Out-Filterresults: notjunk:1;V01:K0:jVff1Cpij4c=:fKxlRrQWCcEZi1KryHdevs 3yIPgyQ1JTQ3kyZjxGwfbjoFi0SvZkDHKNnFPPcFUhXzTIeGKwMK7KwKuuyibIuADzR/82DfS 8KdCs5qC1uMFhXSYsOfQ6Vma7YDGEhNCwKfONM7/O7P18QlebbZNO4+HEnq1umsLtLscUSgKp zZPX1My7PJoKBTV0hJYFRdO0uDO5H5xl8BZ4NtrPiFGnCTwotstA1KON8I6f8BwAQvg2rc4sk QRD77enZAA17oAhDPW38v9BBYHhVx+arqiN0sdYOA0bEf78C4aDTAuCCs9QeJ1EAlKA1LaeLe Ra5aTosll6Wsp6w8MHH3dbnPHPy2n0FmKX58d/IepY4F9UDOoHi3iIz2bcelrdUJKRVDl71IV HLFLmyZ/GDfGpTi4INgAboZKeybDmmsIIgqyRo8ZfuiDWdNGH+Ffj93zjb7xtmnWb7HoW1fRX 2ussqrZFkpPjqbCjadEmW05kiEDEc1O4chQjUu5kB+rf3VX3Mg0Nao97Gi920VqlYsi8cwrtw jxlos3hcnhnK2xPoTeeaPsjqSypCZ09yrNgwZEPN2/ye89I7lkNRDC3KNHvkZ7lt16Z3Cy16Q URpfYYiun0k4dhvbdbzLvy29YZA/kMd+7Nh3/BDRBPazazFKoDonyrdaK2U4AYe7Ubgo7gpFm C4tKyXEavFuyMpaBlkCFMSKLi4n6CkDnX4hbP0f9jrnJdMN+0X7yMZOJWdYptcyP8jV0SbFnv v7kHKo/KoxqhY3fy Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Monday 12 October 2015 16:42:31 Mark Brown wrote: > On Fri, Oct 09, 2015 at 02:36:47PM +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: > > Shouldn't we have an annotation or something for this in > mutex_lock_nested()? It seems like something that might come up > elsewhere and it's a bit of a surprise to have one of the arguments > there not be evaluated. > I've found a better solution by making mutex_lock_nested an inline function. Will send a new patch. Arnd