Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp95885pxa; Tue, 11 Aug 2020 18:32:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxy/m4cR4799EcNP25WsdCoLaAzLrI8ONgT/HKZIDvpJKb9hxykXXkwvGkLpYV90aFlEyVB X-Received: by 2002:a17:907:20f5:: with SMTP id rh21mr28715098ejb.194.1597195956445; Tue, 11 Aug 2020 18:32:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597195956; cv=none; d=google.com; s=arc-20160816; b=ZMA6wsAMa69z1XkH9VrdScJdjZYxWbSkrA5H6NViZfC7FrXGy1wsvSNfamzq5o+Oo8 OmC070Dn2YXgdeSsBiSCBrRdLs25Piv9m+W0sEImCdksM8am7FHPTbRyZg1ldRiFyrF+ oGJzCX19P2DZ5Hw27JQmQqfaLnNTpR0itgrbm8f8mQ/tvXqFf4GeMNd3fwO0Ai40Kiqk nENF6vpT5+qO1SR2S0Wzl5bZn98490UaWFs9YRthfUYS2ZYFX3jhUTlO/4UdJ6p0XyO3 0g+t2CTB+/1HW4xpLGDBgzUD0jqnKHCwp5AexOsAYEKLMwecch/nodmbN6EQwxZWusZr fybQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:content-transfer-encoding :mime-version:subject:from:references:in-reply-to:message-id:date :dkim-signature; bh=qYwyWRcTwmkGaaIpgOTcDWwfwKBVgYr+H+WtkWmc2pg=; b=Xjfln2dnSRxpNvzQuDaDGZnEI5+WZ2+hV7cikll0N853rbR6pR02JwvyUIjCVMyYW1 A6oJNldfFxlnUF6XyahwGVWA6ugb9ee0Q1vrk4vkAfJ2N7GMNLY13teT6prpGnz9zaxR IJE3fnShgrjhbZacy1K5Mv8ph3YAPTDU4gfBQDUV3yzFCBBZ/8LmxSrLvPPXpa2JvELO NkT17dQUc1QOCJqlYQzfFjCQHAiywZPAjbRuPsusHyhkRtda7XpF2oomstdlKYztPk8m 6ti/GRjop0cicEFe+DoxKkOB1V3NtJ3zXzNTU85HBnnRo4qbKBtRu8huEKh6QfIRLNA0 iqGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rere.qmqm.pl header.s=1 header.b=fmcFXjbr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a5si221711ejb.582.2020.08.11.18.32.13; Tue, 11 Aug 2020 18:32:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@rere.qmqm.pl header.s=1 header.b=fmcFXjbr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726634AbgHLBbn (ORCPT + 99 others); Tue, 11 Aug 2020 21:31:43 -0400 Received: from rere.qmqm.pl ([91.227.64.183]:34618 "EHLO rere.qmqm.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726596AbgHLBbk (ORCPT ); Tue, 11 Aug 2020 21:31:40 -0400 Received: from remote.user (localhost [127.0.0.1]) by rere.qmqm.pl (Postfix) with ESMTPSA id 4BRBxk5FrGzL3; Wed, 12 Aug 2020 03:31:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=rere.qmqm.pl; s=1; t=1597195898; bh=XEoKRBZECEkyN1oihPs+gezDGNLo5+SRcrR4YW7HYzQ=; h=Date:In-Reply-To:References:From:Subject:To:Cc:From; b=fmcFXjbr9wFg/JR0K4IhDH2h5KldlVA2zJEsU+phi1kXNIaZW7L80SvSVfhAclV0D 6Mlmfpk9j2yMUv3usEuniXHQlJ3ZGQ0B5tzlRYzWH0Zpz1CjArKTHlFPLnnQsmm00t I1N7t0LR36GSckVlm+zgW+X6Wmi61x16eFXcc5RnE5IdgFSbR7ITgWoYaBB9ChCe/L N8N/jaVPMkhiiwyQ2dgKrZf+q5I8iUVS2fWwBa+CsVxBmyzJEuG3wH94jdeuN+DqP3 SWc+Agc9jLUgYkmXx0Eyf1/w1UDvA8mTbIGlHkm6h+0UCxLGA2fiNmO6F3CIq7upLr C6eMx/14g+z2g== X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.102.4 at mail Date: Wed, 12 Aug 2020 03:31:38 +0200 Message-Id: <25eb81cefb37a646f3e44eaaf1d8ae8881cfde52.1597195321.git.mirq-linux@rere.qmqm.pl> In-Reply-To: References: From: =?UTF-8?q?Micha=C5=82=20Miros=C5=82aw?= Subject: [PATCH v2 7/7] regulator: remove superfluous lock in regulator_resolve_coupling() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit To: Dmitry Osipenko , Liam Girdwood , Mark Brown , Vladimir Zapolskiy Cc: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The code modifies rdev, but locks c_rdev instead. Remove the lock as this is held together by regulator_list_mutex taken in the caller. Signed-off-by: Michał Mirosław Reviewed-by: Dmitry Osipenko Fixes: f9503385b187 ("regulator: core: Mutually resolve regulators coupling") --- v2: reword commitmsg --- drivers/regulator/core.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index bfd4114d6654..9ca89fee0d7e 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -4942,13 +4942,9 @@ static void regulator_resolve_coupling(struct regulator_dev *rdev) return; } - regulator_lock(c_rdev); - c_desc->coupled_rdevs[i] = c_rdev; c_desc->n_resolved++; - regulator_unlock(c_rdev); - regulator_resolve_coupling(c_rdev); } } -- 2.20.1