From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D3289C433EF for ; Mon, 11 Oct 2021 17:04:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B3D156103C for ; Mon, 11 Oct 2021 17:04:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232866AbhJKRGj (ORCPT ); Mon, 11 Oct 2021 13:06:39 -0400 Received: from marcansoft.com ([212.63.210.85]:58418 "EHLO mail.marcansoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233127AbhJKRGh (ORCPT ); Mon, 11 Oct 2021 13:06:37 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: hector@marcansoft.com) by mail.marcansoft.com (Postfix) with ESMTPSA id A1FE742468; Mon, 11 Oct 2021 16:57:46 +0000 (UTC) From: Hector Martin To: linux-arm-kernel@lists.infradead.org Cc: Hector Martin , Alyssa Rosenzweig , Sven Peter , Marc Zyngier , Mark Kettenis , Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Viresh Kumar , Nishanth Menon , Catalin Marinas , "Rafael J. Wysocki" , Kevin Hilman , Ulf Hansson , linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [RFC PATCH 4/9] opp: core: Don't warn if required OPP device does not exist Date: Tue, 12 Oct 2021 01:57:02 +0900 Message-Id: <20211011165707.138157-5-marcan@marcan.st> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211011165707.138157-1-marcan@marcan.st> References: <20211011165707.138157-1-marcan@marcan.st> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org When required-opps is used in CPU OPP tables, there is no parent power domain to drive it. Squelch this error, to allow a clock driver to handle this directly instead. Signed-off-by: Hector Martin --- drivers/opp/core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/opp/core.c b/drivers/opp/core.c index 04b4691a8aac..89e616721f70 100644 --- a/drivers/opp/core.c +++ b/drivers/opp/core.c @@ -873,12 +873,13 @@ static int _set_required_opp(struct device *dev, struct device *pd_dev, return 0; ret = dev_pm_genpd_set_performance_state(pd_dev, pstate); - if (ret) { + if (ret && ret != -ENODEV) { dev_err(dev, "Failed to set performance rate of %s: %d (%d)\n", dev_name(pd_dev), pstate, ret); + return ret; } - return ret; + return 0; } /* This is only called for PM domain for now */ -- 2.33.0