Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp28528pxk; Tue, 15 Sep 2020 16:50:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx+OYBahRckpEioUm+GxUNy9XR3nKE3irNyXz31W+rBR4+upNgqrBTroiIWVk3UHkFG/ZmA X-Received: by 2002:a17:906:915:: with SMTP id i21mr22081800ejd.113.1600213824704; Tue, 15 Sep 2020 16:50:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600213824; cv=none; d=google.com; s=arc-20160816; b=tHGJGQ97F92pjv6127BsPAOS7EUETeiZ8eqym21toG7zFWN3Qv+fVKQQKXjb4XeUHW c8rN6ebz+Nn01LuP0dlFmuIuQltBQr7wNlRbHnVYRV56VIGvR98ULUkFPdt4KH3xskIo RmM6TRjVGm/y3AiB21XARaOcwXw5Lfyo9oibJr5JZVQDjSGH02NCsWlbs09CIWIUKhgl 6v55Ew/zCAbKyEgbgidpVfhdp3gTL3H8qcm3qQxJYEmRLJ4xoumzlNApI4H2vcNtoWFB SyvwCfDqVPmcZsQeECpbkqyhLFd2Z953e3iaiUK/QSbTFKvhyhhkwJnJjh5Epmsyyw13 SEPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=jv3ztxRbp4Vo1wvH5tJv8vqN+QZ/Ew5otd9suqKdcVg=; b=DvG8WawjjziqkjGu45Lqj/DOP4dqkCBLaeskipFPVtggkq7nva2TWg+T/CA0mxD7W9 9ZVHyRxRtRRVs5HAwPlTkgMPJY5zLAii7eS7nxbzC5YAc/sUwo+2ySMVr7VrJHc1BrCf S59aTQbtQDMl++mDQZ31+OoqUTgXCUpl0nUNPVO0BITi/Q/t35W54huJNPN0WfM0xNkf UXBo8jVXUfjaTJZNYwR38cR3lCvJiw6gAX0kfNIr8ipxj9UjzvZu2FyfhCd4rlnMFgUp SC60LGIDlpLp99yNa8pe6/jGLdo7Ij5Bnxarz5XQzLZaj2curCtYOV2eOOGKhzC1RRBk zKKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=IVN3KCKL; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f20si10289796edv.511.2020.09.15.16.50.02; Tue, 15 Sep 2020 16:50:24 -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=@kernel.org header.s=default header.b=IVN3KCKL; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727124AbgIOXsF (ORCPT + 99 others); Tue, 15 Sep 2020 19:48:05 -0400 Received: from mail.kernel.org ([198.145.29.99]:47654 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726184AbgIOOdX (ORCPT ); Tue, 15 Sep 2020 10:33:23 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E1BFE23BE3; Tue, 15 Sep 2020 14:24:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600179887; bh=cDT0847aT75pAqdx4y6V4gjKxPC98U4W/+Bq3lZNOWg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IVN3KCKLxwUbjVGNunektrlfYgBut/aDKRbpx5fN88neHVP58eQUcFB6q+fSlXmw/ fwZrBnmIk+TgbGcFFjTb6TgEWybhkYu3iDmXjZpvdM8y9uahOYXzv01PejaCuBEXdf T2PlhNTiyoRhVhmkA+MFUNFGAI7rWglw14fSNPiU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, =?UTF-8?q?Micha=C5=82=20Miros=C5=82aw?= , Dmitry Osipenko , Mark Brown , Sasha Levin Subject: [PATCH 5.8 006/177] regulator: remove superfluous lock in regulator_resolve_coupling() Date: Tue, 15 Sep 2020 16:11:17 +0200 Message-Id: <20200915140653.933221961@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200915140653.610388773@linuxfoundation.org> References: <20200915140653.610388773@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Michał Mirosław [ Upstream commit a577f3456c0a2fac3dee037c483753e6e68f3e49 ] 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. Fixes: f9503385b187 ("regulator: core: Mutually resolve regulators coupling") Signed-off-by: Michał Mirosław Reviewed-by: Dmitry Osipenko Link: https://lore.kernel.org/r/25eb81cefb37a646f3e44eaaf1d8ae8881cfde52.1597195321.git.mirq-linux@rere.qmqm.pl Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- drivers/regulator/core.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 86107d2e1733e..0ba5ca7082afd 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -4891,13 +4891,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.25.1