From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754594AbbHFHaN (ORCPT ); Thu, 6 Aug 2015 03:30:13 -0400 Received: from mail-wi0-f174.google.com ([209.85.212.174]:38127 "EHLO mail-wi0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750773AbbHFHaL (ORCPT ); Thu, 6 Aug 2015 03:30:11 -0400 Message-ID: <55C30CD9.9090408@linaro.org> Date: Thu, 06 Aug 2015 08:29: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: Krzysztof Kozlowski CC: Liam Girdwood , Mark Brown , 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> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Thanks Krzysztof On 06/08/15 02:39, Krzysztof Kozlowski wrote: >> --- a/drivers/regulator/core.c >> >+++ b/drivers/regulator/core.c >> >@@ -2919,7 +2919,7 @@ static int _regulator_get_voltage(struct regulator_dev *rdev) >> > } else if (rdev->desc->fixed_uV && (rdev->desc->n_voltages == 1)) { >> > ret = rdev->desc->fixed_uV; >> > } else if (rdev->supply) { >> >- ret = regulator_get_voltage(rdev->supply); >> >+ ret = _regulator_get_voltage(rdev->supply->rdev); > Is the 'rdev' and 'rdev->supply' same regulators? If not then you are > just hiding false warning by removing locks thus introducing real > issue... They are the not the same regulators, and hence they are not locking the same mutex, looks like this is a false positive warning from lockdep. I can't think of any use case which could result in ABBA type lockup too, so we can ignore this patch for now. Not sure why did the lockdep think that this is same lock :-) --srini > > Best regards, > Krzysztof