From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755511AbbHFLB5 (ORCPT ); Thu, 6 Aug 2015 07:01:57 -0400 Received: from mail-wi0-f170.google.com ([209.85.212.170]:33922 "EHLO mail-wi0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754673AbbHFLB4 (ORCPT ); Thu, 6 Aug 2015 07:01:56 -0400 Message-ID: <55C33E89.2060501@linaro.org> Date: Thu, 06 Aug 2015 12:01:29 +0100 From: Srinivas Kandagatla User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Mark Brown CC: Liam Girdwood , linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH] regulator: Fix recursive mutex lockdep warning References: <1438790528-4435-1-git-send-email-srinivas.kandagatla@linaro.org> <20150806094329.GQ20873@sirena.org.uk> In-Reply-To: <20150806094329.GQ20873@sirena.org.uk> 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 On 06/08/15 10:43, Mark Brown wrote: > On Wed, Aug 05, 2015 at 05:02:08PM +0100, Srinivas Kandagatla wrote: >> A recursive lockdep warning occurs if you call regulator_set_voltage() >> on a load switches that are modelled as regulators with a parent supply as >> there is no nesting annotation for the rdev->mutex. >> To avoid this warning, use the unlocked version of the get_voltage(). > > No, just completely removing the locking is broken - the locking is > there for a reason! This needs some lockdep dance, either something Yes, I totally agree, removing locking would have more regressions. > like what we have for regmaps with a class per regulator or something lock_class per regulator makes more sense, I will try to cookup an RFC patch. > more fancy but whatever's going on just hacking out locking to shut up > warnings from lockdep is clearly not a good idea. >