Received: by 2002:a05:6a10:6d25:0:0:0:0 with SMTP id gq37csp1839266pxb; Mon, 13 Sep 2021 06:41:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzGbjklj+/VFhweKDm/Mx57ZfP1Fq/sx+jYUlGvy9xXC+zhggUKyCMwnXP18yzKIWo7urVq X-Received: by 2002:a05:6e02:1212:: with SMTP id a18mr8181462ilq.68.1631540473230; Mon, 13 Sep 2021 06:41:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631540473; cv=none; d=google.com; s=arc-20160816; b=Sneu8n+FHPHYxfCRg34XypW3PtFRwvMWpmPMiHHs6AwBkHksKtQ7Cj0jxJTq1stOvE jpCzQ1CYQjwxEnnCjIKFoAvQ3s1w3rAe3qmjJFm6KrlCAeKI8vssL4d/iVsTmlfjRiJ1 7vU3HkDlTVyb3/o2zTD1jb4MV89sxiqeux4+8GXwqhTVYlQcYxJ/tUfBPYaKggbuVJ9/ BGBZv9DQeqGHa5PfliX0U8z9IEQBwuiLra8m6IHXlXUYoZO8ZSSjTc5Pwy/wUNGeWkLl B/XNhT+YT69UaqUA0ZCFi51AOgAYb5JdE/bfvT/WRT3s+q0C/G13OATp2OABsCTVmCfG QMJw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=LcOi+0fTXVooQaDJ9SpHTHZjG8B6AzZQJHenhVfWpoY=; b=GWPHrxdWZVcnfmNqwIy8w8uysVgU4oQyvA/CQeQLyUZ3v1JsE3nZC8LjFF1/mxcn2/ OZnYMiuaXwX31B0BBA6efUPuzVuUndpm5f7UYBXhFskNOaiPqBP3XexkUQ9MdGKCwNX1 8MmBkuj1KX5y8O0JYEhN6BtJ9miPDWxLsyX/9ZOzsT6vLsEWjd8X+fsyjfuxLX7GnRht gTO+znHGB3lVn03Q1SNTGgYuY2mYEqUwGukPrwxCOeNWlddeo6MzkwAwnl1+OnQ0J/Ip +Ag2cl8Jv3jRckMCk14RPd+vCSBMGYDAem+KJEeeQajTUX3ceUvM7RIVmlhUPhP353rl nh5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=IUBv54RM; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s10si6436910ioo.6.2021.09.13.06.40.59; Mon, 13 Sep 2021 06:41:13 -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=@linuxfoundation.org header.s=korg header.b=IUBv54RM; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242035AbhIMNkM (ORCPT + 99 others); Mon, 13 Sep 2021 09:40:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:58340 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242947AbhIMNeg (ORCPT ); Mon, 13 Sep 2021 09:34:36 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 23F1A60698; Mon, 13 Sep 2021 13:26:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631539596; bh=CdyYA6fZ3SFJZPNZQPOSTQRVaqVbI4RsIJs7AlyQ/iw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IUBv54RMNKEDI0A4o5VCBaIeNnrSgKFon8yokpdiz16GwkzAzlemFAD1TaFtc5bYK CTKgsZ7O6mHMq5JZ1jwi/hYUPoKk+7p5ZzYS9RaB597AQsuADwEfpFG5hMpsICqExW MYHmn39gfPKpd9X5FB9Kc3YHenpKyUNqSNlXN6Co= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Rajendra Nayak , Stephen Boyd , Sibi Sankar , Bjorn Andersson , Sasha Levin Subject: [PATCH 5.10 085/236] soc: qcom: rpmhpd: Use corner in power_off Date: Mon, 13 Sep 2021 15:13:10 +0200 Message-Id: <20210913131103.247145517@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913131100.316353015@linuxfoundation.org> References: <20210913131100.316353015@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Bjorn Andersson [ Upstream commit d43b3a989bc8c06fd4bbb69a7500d180db2d68e8 ] rpmhpd_aggregate_corner() takes a corner as parameter, but in rpmhpd_power_off() the code requests the level of the first corner instead. In all (known) current cases the first corner has level 0, so this change should be a nop, but in case that there's a power domain with a non-zero lowest level this makes sure that rpmhpd_power_off() actually requests the lowest level - which is the closest to "power off" we can get. While touching the code, also skip the unnecessary zero-initialization of "ret". Fixes: 279b7e8a62cc ("soc: qcom: rpmhpd: Add RPMh power domain driver") Reviewed-by: Rajendra Nayak Reviewed-by: Stephen Boyd Reviewed-by: Sibi Sankar Tested-by: Sibi Sankar Link: https://lore.kernel.org/r/20210703005416.2668319-2-bjorn.andersson@linaro.org Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin --- drivers/soc/qcom/rpmhpd.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/soc/qcom/rpmhpd.c b/drivers/soc/qcom/rpmhpd.c index e72426221a69..c8b584d0c8fb 100644 --- a/drivers/soc/qcom/rpmhpd.c +++ b/drivers/soc/qcom/rpmhpd.c @@ -310,12 +310,11 @@ static int rpmhpd_power_on(struct generic_pm_domain *domain) static int rpmhpd_power_off(struct generic_pm_domain *domain) { struct rpmhpd *pd = domain_to_rpmhpd(domain); - int ret = 0; + int ret; mutex_lock(&rpmhpd_lock); - ret = rpmhpd_aggregate_corner(pd, pd->level[0]); - + ret = rpmhpd_aggregate_corner(pd, 0); if (!ret) pd->enabled = false; -- 2.30.2