Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp452736pxb; Thu, 9 Sep 2021 04:57:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxUZdWu45TALxz4rdxwUD2GMsbVdHf7x/cco5xK4u/kiKP5c95GOwElMzM+MKI6RhsGDzE6 X-Received: by 2002:a5e:c609:: with SMTP id f9mr2358407iok.127.1631188631027; Thu, 09 Sep 2021 04:57:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631188631; cv=none; d=google.com; s=arc-20160816; b=XtzX/CI4iALV/HdtDT85LpAD4qPAdzNY3ibyDZsou9boHnxteRWT7vXtwX0oBoWn74 mLXehDeWLyWI9cqq7FBj5t8lFxpC0OJbJe6kvnTAUxgBq7Tr/lSezC5h+6qdim7M/cQO 3J6KsPeaOCk6gWt7LSjnlfVInoWjeFzVEmW5HvZgW8WONFSuz/SHMUC/u5S5L6Tnhew/ Kl+Q9RTlH3TKmKel1MLPF68TdpQVIkJ7UPZewP0z44+2VXQ8VdRDCGegeEj+grDB8ncS Zi+INUcc68n+EuQE8kPk4TLxLVfdroaS7xhI5lv5gOvmMrK+0np/ihe2677ATtXCggHi hvCA== 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=JJ5hSLh+lBX3+F7tMe0oF8zDfyqmAZQHGMaoHzRlc+4=; b=wlWifE+ekfly4vFmIQUS0ReABA3J4JeWehmGZeHiwGEwNb8NOQlqDuVJJJ81GvjGMd TWbDBzDMOLcC0rELguiE8OHFvs+5CcEBT5Oyy6sfL9/37oA8XUdUfWKnoE7FXg7SZU+r j7IqOq/82m5+aGJu1SHEPhON1EjY4BfrN8G/ooisUloze4RxB0cohbnqHKzderjKc3Ev bcG6BqI2xabsgfH7EEFxwRCXGq4s5w1osl0ldokAedZMwGskAWqP1Hdr6GE3I67UW408 DdU8iKZx2L5Z/E47QqYKvNhl/uy6EnrIrZtFoHZhRca8nyZy5fhXne3B9B3gXg2CZM/9 AoEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=iVCOOJdj; 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 m82si1290136ioa.74.2021.09.09.04.56.59; Thu, 09 Sep 2021 04:57:11 -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=iVCOOJdj; 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 S238730AbhIIL5U (ORCPT + 99 others); Thu, 9 Sep 2021 07:57:20 -0400 Received: from mail.kernel.org ([198.145.29.99]:55692 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242230AbhIILxg (ORCPT ); Thu, 9 Sep 2021 07:53:36 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id E3A9161381; Thu, 9 Sep 2021 11:44:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1631187878; bh=eQ/aIDvFKn1QYb0ICYb51SQjR1as65TKBfwZBjILHsw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iVCOOJdjiFElPy5/4p4C2x+pCL2nhcOmN/L1XyjPos6Ryay4AGRn08ttAiH69rM4A tkKMtln/nkv7X79gyYwcpJkli/QzpiFqyBULroM7bRvQADpfG8JQNPiMoKEMUk/TFC RtyJnw1WXZiNmPYF0VYTDMio87hRwaOl4K5JDFRL+l+vz+VTesapQvt8j0zU2cKNAB Ajt/R18CXmLKzyO0Hr66N7z9ha5UiaNIdad8uAXMAjpg+cF+hemRCuTnIrBBrsJ2fh 6SnnWHOX3aPvbU5QSQgCxJNeRQSbSNSBTyL6V8p5yIMgBSs0lKhqy92n7YA4FqpI1+ z46KL/3PkJijQ== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Rajendra Nayak , Ulf Hansson , Viresh Kumar , "Rafael J . Wysocki" , Sasha Levin , linux-pm@vger.kernel.org Subject: [PATCH AUTOSEL 5.14 162/252] opp: Don't print an error if required-opps is missing Date: Thu, 9 Sep 2021 07:39:36 -0400 Message-Id: <20210909114106.141462-162-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210909114106.141462-1-sashal@kernel.org> References: <20210909114106.141462-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Rajendra Nayak [ Upstream commit 020d86fc0df8b865f6dc168d88a7c2dccabd0a9e ] The 'required-opps' property is considered optional, hence remove the pr_err() in of_parse_required_opp() when we find the property is missing. While at it, also fix the return value of of_get_required_opp_performance_state() when of_parse_required_opp() fails, return a -ENODEV instead of the -EINVAL. Signed-off-by: Rajendra Nayak Reviewed-by: Ulf Hansson Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin --- drivers/opp/of.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/drivers/opp/of.c b/drivers/opp/of.c index 67f2e0710e79..2a97c6535c4c 100644 --- a/drivers/opp/of.c +++ b/drivers/opp/of.c @@ -95,15 +95,7 @@ static struct dev_pm_opp *_find_opp_of_np(struct opp_table *opp_table, static struct device_node *of_parse_required_opp(struct device_node *np, int index) { - struct device_node *required_np; - - required_np = of_parse_phandle(np, "required-opps", index); - if (unlikely(!required_np)) { - pr_err("%s: Unable to parse required-opps: %pOF, index: %d\n", - __func__, np, index); - } - - return required_np; + return of_parse_phandle(np, "required-opps", index); } /* The caller must call dev_pm_opp_put_opp_table() after the table is used */ @@ -1328,7 +1320,7 @@ int of_get_required_opp_performance_state(struct device_node *np, int index) required_np = of_parse_required_opp(np, index); if (!required_np) - return -EINVAL; + return -ENODEV; opp_table = _find_table_of_opp_np(required_np); if (IS_ERR(opp_table)) { -- 2.30.2