Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp2896327pxb; Tue, 24 Aug 2021 10:05:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyrEiHyINI+g3SG0w9sAh4A9/UaKeykSZAds3i3TpfbiotzVDUL7Ly+ewXYdFHstdJ2GPZl X-Received: by 2002:a02:b091:: with SMTP id v17mr36130829jah.33.1629824733342; Tue, 24 Aug 2021 10:05:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629824733; cv=none; d=google.com; s=arc-20160816; b=ZYS5wGBgupJB4CfwRxDG22Fq6cc0pY2D5IPSS5/jJ/535hzBUSnvmWSjWxFvbLq6gd DYZCJDXVdfhp0D9zce/EsMWxTqDnBQh8XVztITDdhEMIpP4xm1fhuAd++BuMIIBBORi+ IrJbvAlQXE/2OyVNIZ2W7Fkz4xJHddWP9sn9Oxr6JUiMnimZX3RIqvhcTR1Taph4+DRd 02XNSVbdLfTYKSv8kwttIlpBz9Pp4KNJs1sZffSWTUTTIjl5Ah5M3NxryUi0WLULPCjj HWEKp37fSuhUr4c7NmEaQzZTQK81IXXRs2y/b42pPhIvomNOf02G3FZz4KQ4kSGQSf9L oLyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=7Vejb5iyohqKuO7m6/AkpNvn+uWfCFguNx4cgKEQmvg=; b=DxRAQ8YPVMKljcYqJtaF0z6gpeD+3IOnCPjP5TD/gs+UkfHvJMQFLLpJxt5+TM8FKG L5wpv/Wypjo+7WiAL61SaCJDRlPVzSlz+JdTlT0ZhHb/xWHYNpvsoW3uqYoVaCUUn55+ 6Ljc66n6B1NMakWdL+PqpgEHTUWo6Qjxt+AoU1vmhKBsOdIpOjgM51OK8/IhuGgLW/rW 7YGz8jNQtd2QAfX412RSf1sZy0MuqkqvWSea4cbfIgHWBwuHREiaT2uuQrukTZeqC8Lf wZAH3r9q1LkVpJQC570DUhaaHjeBcKzydCbn/q0gISdprl5baKcA8LN8zOnUfeJ9ljZU ZpwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZfhRIqWO; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y20si198463jao.34.2021.08.24.10.05.18; Tue, 24 Aug 2021 10:05:33 -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=k20201202 header.b=ZfhRIqWO; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238877AbhHXRDw (ORCPT + 99 others); Tue, 24 Aug 2021 13:03:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:38858 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235316AbhHXRAo (ORCPT ); Tue, 24 Aug 2021 13:00:44 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7138D614C8; Tue, 24 Aug 2021 16:57:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1629824271; bh=5kdcjmUdWnHx5i77P8X8kFA3r6yfCri9uAYgM7Hn5f4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZfhRIqWOT8XhePs3vT/8HTcv4SkEGUpa7/ua26jME9aBSYuhsJfEPDnrFvlteDFWN yG4erwTXG7XQxKvxNWWA36ceiFTVCuGd7nRPXCPUqonr3cIlUAkfz84WWlfgajrFyV jpOrrDdQlsbrGjLRDD45nW5xhBAl2MDlPOXUEXDXvDSGG7yOV1FQHk68vUM6FhhTIK 5c7WzrkmJsipOlouZ3+2WFQhoIPmE3LStQ43Oz6Xz4N38sPggByiuxLsWsu0rj6D2U V1JmLIUhxyy5QdUpO99Wx7gxfAMCpE7rUJRU8KG/u5D/aw444MW0wCpGGXzXQ+Yus9 l2G0HC3ljBHfQ== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Dmitry Osipenko , Viresh Kumar , Sasha Levin Subject: [PATCH 5.13 105/127] opp: Drop empty-table checks from _put functions Date: Tue, 24 Aug 2021 12:55:45 -0400 Message-Id: <20210824165607.709387-106-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210824165607.709387-1-sashal@kernel.org> References: <20210824165607.709387-1-sashal@kernel.org> MIME-Version: 1.0 X-KernelTest-Patch: http://kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.13.13-rc1.gz X-KernelTest-Tree: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git X-KernelTest-Branch: linux-5.13.y X-KernelTest-Patches: git://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git X-KernelTest-Version: 5.13.13-rc1 X-KernelTest-Deadline: 2021-08-26T16:55+00:00 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dmitry Osipenko [ Upstream commit c3ddfe66d2bb511f7fbcdc8e64952c7859e7e69d ] The current_opp is released only when whole OPP table is released, otherwise it's only marked as removed by dev_pm_opp_remove_table(). Functions like dev_pm_opp_put_clkname() and dev_pm_opp_put_supported_hw() are checking whether OPP table is empty and it's not if current_opp is set since it holds the refcount of OPP, this produces a noisy warning from these functions about busy OPP table. Remove the checks to fix it. Cc: stable@vger.kernel.org Fixes: 81c4d8a3c414 ("opp: Keep track of currently programmed OPP") Signed-off-by: Dmitry Osipenko Signed-off-by: Viresh Kumar Signed-off-by: Sasha Levin --- drivers/opp/core.c | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/drivers/opp/core.c b/drivers/opp/core.c index e366218d6736..4c23b5736c77 100644 --- a/drivers/opp/core.c +++ b/drivers/opp/core.c @@ -1846,9 +1846,6 @@ void dev_pm_opp_put_supported_hw(struct opp_table *opp_table) if (unlikely(!opp_table)) return; - /* Make sure there are no concurrent readers while updating opp_table */ - WARN_ON(!list_empty(&opp_table->opp_list)); - kfree(opp_table->supported_hw); opp_table->supported_hw = NULL; opp_table->supported_hw_count = 0; @@ -1934,9 +1931,6 @@ void dev_pm_opp_put_prop_name(struct opp_table *opp_table) if (unlikely(!opp_table)) return; - /* Make sure there are no concurrent readers while updating opp_table */ - WARN_ON(!list_empty(&opp_table->opp_list)); - kfree(opp_table->prop_name); opp_table->prop_name = NULL; @@ -2046,9 +2040,6 @@ void dev_pm_opp_put_regulators(struct opp_table *opp_table) if (!opp_table->regulators) goto put_opp_table; - /* Make sure there are no concurrent readers while updating opp_table */ - WARN_ON(!list_empty(&opp_table->opp_list)); - if (opp_table->enabled) { for (i = opp_table->regulator_count - 1; i >= 0; i--) regulator_disable(opp_table->regulators[i]); @@ -2168,9 +2159,6 @@ void dev_pm_opp_put_clkname(struct opp_table *opp_table) if (unlikely(!opp_table)) return; - /* Make sure there are no concurrent readers while updating opp_table */ - WARN_ON(!list_empty(&opp_table->opp_list)); - clk_put(opp_table->clk); opp_table->clk = ERR_PTR(-EINVAL); @@ -2269,9 +2257,6 @@ void dev_pm_opp_unregister_set_opp_helper(struct opp_table *opp_table) if (unlikely(!opp_table)) return; - /* Make sure there are no concurrent readers while updating opp_table */ - WARN_ON(!list_empty(&opp_table->opp_list)); - opp_table->set_opp = NULL; mutex_lock(&opp_table->lock); -- 2.30.2