From patchwork Mon Sep 13 13:12:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 509764 Delivered-To: patch@linaro.org Received: by 2002:a02:c816:0:0:0:0:0 with SMTP id p22csp613451jao; Mon, 13 Sep 2021 07:30:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwvrbof/qBQHRUZW6RMBFl5xjgRS7b5bLoozgAmXafG3WIEmRURazsPboBEZmsOecsEVNhy X-Received: by 2002:a17:906:31cf:: with SMTP id f15mr13014409ejf.272.1631543416210; Mon, 13 Sep 2021 07:30:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631543416; cv=none; d=google.com; s=arc-20160816; b=BNpd75S8A/JAwjmBk7OkZhE04qkLP044WqauqsJPyHb1VlcLf5cWFmKFYxR1bi8ljO 8cHwYnDpUzJUL9xLgiJ624peihzbi9zihQBdW8bprPQNuJNhvEkdQZXEzNNHd7trh4Ob zN+qu1Cgl2Gt475cY+nJw3t+qnUZ4Lj9UT99xNvoRVXFUpmM+sLFrqDOD2SQpZC1hS82 oXGD6Rf4/CkYm52mZhaEQqBz1RNWSuI16xiyB8K2XcDPYxQtZ4VFeOFSocrUPwKV/dpx 2IUeMrPLDMhPppIXjfNyOCXis0XGn4+/ZaVGrsd/39slWEE3dMq2q8yBM/aLGnzZJpnc 0lsA== 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=yXrZ9+t7/qrgD0mec+jCReWgF4LcNwKiyIKHqvhhKHY=; b=G1cvtVXY5W4C+iCJY5684ruPzSqoKyVvPOLg3MmuK3ORMNK9r0hbMEldnGJZLc3FZq UipIjg0/bXP42TXPA9davVDBQ75LAG3G7xQTARZKC5qurys0Pr8ochmkNB94yHLZM75G UtR1eZWsmiHm4eRMoh/E/qHIsjgkbIMbDgbfd5JzaVrGPL82tINW6LPVZXHBLZNaKT3D VytfuIfM8z54bnATTM7M3Ese2FJ5vVZdIA3WDDKAX7CdcneeDQeazj/yfvlKhCa+xyzY jCjUoGiG8aqi3ooNOW2B1U8bWyQLDSjGit09Jo6JVw+yu577gIoJu5HmtoMwrWjLq4fg txHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=PvqgD9TU; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-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 b17si935604ejl.601.2021.09.13.07.30.15; Mon, 13 Sep 2021 07:30:16 -0700 (PDT) Received-SPF: pass (google.com: domain of stable-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=PvqgD9TU; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-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 S1344800AbhIMObI (ORCPT + 11 others); Mon, 13 Sep 2021 10:31:08 -0400 Received: from mail.kernel.org ([198.145.29.99]:51894 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346865AbhIMO3x (ORCPT ); Mon, 13 Sep 2021 10:29:53 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5327961371; Mon, 13 Sep 2021 13:50:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631541036; bh=0ym9c6vMbmiFjOfck6JuikI7DmF8QGx8Hvf0IB0e6Qo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PvqgD9TUULR0Xpu04xMgUIqZLH25DwcY7aFlkG3cSIryv536eFxQp+W8LM0834Mg8 LwGwpxY0RsFtakem7QCDDm6yA+4iopGyeMqdVR5SPujGDLyqrNXGjGLCf0+9zM1Erl SKCuD4SvS1ldIU+UNLZIHFVW3yraV3FMUHc5I1Lc= 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.14 103/334] soc: qcom: rpmhpd: Use corner in power_off Date: Mon, 13 Sep 2021 15:12:37 +0200 Message-Id: <20210913131116.856452169@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913131113.390368911@linuxfoundation.org> References: <20210913131113.390368911@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@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(-) -- 2.30.2 diff --git a/drivers/soc/qcom/rpmhpd.c b/drivers/soc/qcom/rpmhpd.c index 2daa17ba54a3..fa209b479ab3 100644 --- a/drivers/soc/qcom/rpmhpd.c +++ b/drivers/soc/qcom/rpmhpd.c @@ -403,12 +403,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;