Received: by 2002:a05:6a10:6d25:0:0:0:0 with SMTP id gq37csp1822991pxb; Mon, 13 Sep 2021 06:21:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzIjY3UOy6dqqRhRyCRkkgbY832VLpT7ADPpaxpPN0gagOhse7BchCfDfxokMV6n6YhFw9L X-Received: by 2002:a6b:610e:: with SMTP id v14mr8774137iob.70.1631539293486; Mon, 13 Sep 2021 06:21:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631539293; cv=none; d=google.com; s=arc-20160816; b=LUNlrhHrpFTlX5CNOUxj8WWUW0RhNBenP6Z1bHFIuWbCy1CSIILpPtVTt0e3eBhXzH CPs9uVESrQIKIxSNeBqkwIYS3oTHt8gzOaSob7elHQ9SPesbUlrfyAFzC+f8cgCpzmp9 yJT/+4XnegQQXonP2q9uxaDUbOQOtlxpIz7CFQFZ6LNzU3eFBME/+3Mumwz/tBZF66J5 qcsXfIbR5CpzSum+d5GfcaD799klppf0vcuDsI6trdMrIwI/pgkBxN63g89QOVcQ3bps WJazlhWRM8B9bZkWR9dcgq3zGYhLpxMJHJAji9SVwWAdEhwSfba0RImZJbfW4M7wv72o Pl2g== 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=ZbQZoof08nElfLgD+8YCl6KmDr8fvYpasIpPI5uYPos=; b=tP0ZeJLJ84TGm7u2AhsS36aUW7AtiyTMdzsXuBe0Z2R4tVRWEzo3l7gUkj9ah4IqXv rjgQx8YXjJbkvDhLQ7xYPH+gZuu6gAOF4W1saY7Qh7gPH8YI10owRpOFUMiDKxaR12K2 uuzJHqg9a8I6vn2jOdGcofAgxEVSb1NPJQG7eBUuaN6noFHHCpw+z7f2cR5aFhNl8sGa R6grgcSNGcpnRE/waJlqj+OEYLcr27mv1WPfUaJa30CzDaKEGVKyU6h6tfwKAGyFMZa9 tyvyLrMLWfvb/Cki0HtW7arLYoam/mcPfDu+7XP030cc6evi6gfvSYHEmfzi8HatPwPX PMpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Ds8gj8Fe; 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 m22si6922328jaa.92.2021.09.13.06.21.21; Mon, 13 Sep 2021 06:21: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=@linuxfoundation.org header.s=korg header.b=Ds8gj8Fe; 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 S240454AbhIMNVQ (ORCPT + 99 others); Mon, 13 Sep 2021 09:21:16 -0400 Received: from mail.kernel.org ([198.145.29.99]:34856 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239614AbhIMNUe (ORCPT ); Mon, 13 Sep 2021 09:20:34 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id E2EB2610A3; Mon, 13 Sep 2021 13:18:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631539139; bh=PKMhz0ebKCsIG/+kx1GjqvcY4PBBlBtlCPpFstCHtSk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ds8gj8FegKb33PpljeFQcFbEaOYL3p+3xcnJigBI71TRddYtfU9qAvMJggEJ/SzLr tbgljFWlEYZ009tO7Jmvq26cQIatrFMOcFo8XnuTOiSK2f6hvg5YhzGaQUSp3X8IO3 zaTuKBN3lw9ufXcSLxfWQZmfIdjn8YNlR7K86UdQ= 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.4 054/144] soc: qcom: rpmhpd: Use corner in power_off Date: Mon, 13 Sep 2021 15:13:55 +0200 Message-Id: <20210913131049.746780199@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913131047.974309396@linuxfoundation.org> References: <20210913131047.974309396@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 51850cc68b70..aa24237a7840 100644 --- a/drivers/soc/qcom/rpmhpd.c +++ b/drivers/soc/qcom/rpmhpd.c @@ -235,12 +235,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