Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1713454pxb; Thu, 16 Sep 2021 13:43:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwGfDb45zZ7+8cuHO8UHJg9HXvmOCdu0Q6LX/JgaL9N27IJzDXXdE/9gt5P5aPk8TMDh+7m X-Received: by 2002:a50:954c:: with SMTP id v12mr8517053eda.313.1631825001165; Thu, 16 Sep 2021 13:43:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631825001; cv=none; d=google.com; s=arc-20160816; b=iLHRAyioFMEh29O3HaZBxw7mpZl0rHcxbw3Hi+kYM60y1kQjzcZ4KhGqGhPIfCDyQc SWG1yOZNqq2G7zNgXa8WLM0EDJRbrUuXu6pTEc5R3YlDqC6ILCDPa+GyF+dT0Qb9uwSc P3TlpH2Y6/f5kxOGNsfFk9Cy1Bep430Z8dZu4Hn0P5navLbwswwhtcJ0cJdAfVBZ4RNX jB7F+eMqELzuB/YQ3XUVoZ+sXIVuB7+/+w/IWWfLIpuoILxHMii2RRcVqJ1FnzDnc5ra gO0kHZtyz8c1w9yUSQBXcUgkuVluFAGMOnr4Q3Qvu4hew6GEsoPRNj2Rs+3F27VghLG8 cKbw== 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=QiQcSKqylVZ16uq4RqX8V3XG2oaMKWW4CdCfPcoZs6k=; b=uzlMRseBtmLiU0tqMUbyuZm+D6uQkGkRcMcO6PVb0K9LX9Axr8NxxPV2ZeDwxEiwK3 nxFP05mxA4TdUX4fhA9ZQm9u4/gvQCRemfB10b+DAjZwxxB+cIMBbR//s3t0obFamdLa RNYipRwYdnVHOjB7NRF6Oeu5pS4hKQGkh8BUGzzDeLbXdEiiaWt+OlFXYW7F34HkICqF Fgel3ZBc0byVPGWR6hBepaYBUC4QepSvlere/naZIN2ok0CohVrD01ppFS+Wa8oVRzLc zmNcCRLTVy7StI2FBNsyvaDzleBB1KySPZXiFRCCMuxQdBusN2rODQdyUACKdPNXh0KU eoSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=V0qhDPLF; 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 du4si4924040ejc.696.2021.09.16.13.42.55; Thu, 16 Sep 2021 13:43:21 -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=V0qhDPLF; 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 S240993AbhIPQ0N (ORCPT + 99 others); Thu, 16 Sep 2021 12:26:13 -0400 Received: from mail.kernel.org ([198.145.29.99]:54972 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241055AbhIPQTO (ORCPT ); Thu, 16 Sep 2021 12:19:14 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8B4776128B; Thu, 16 Sep 2021 16:13:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631808783; bh=aTU+1b4wazC1TIH6SB1kj9KOELqj54l04zV4kpkgSrg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=V0qhDPLFBVbHlYESP9UAro7Hii0cORrNJ8QOPLIA8VrheKsnDiadqFtktF+4P6tJB K/yb7Di8jPfdVBMbc/NYiU/5rnNV4N6Vk89K/Ff7yZSn338WbWFTcmGiKpgMG64axN S7hnI+yBLq3LURN8Al95Ag611+adCM+SdRm0gcqI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Rajendra Nayak , Ulf Hansson , Viresh Kumar , "Rafael J. Wysocki" , Sasha Levin Subject: [PATCH 5.10 221/306] opp: Dont print an error if required-opps is missing Date: Thu, 16 Sep 2021 17:59:26 +0200 Message-Id: <20210916155801.589977756@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210916155753.903069397@linuxfoundation.org> References: <20210916155753.903069397@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: 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 d92a1bfe1690..f83f4f6d7034 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 */ @@ -1193,7 +1185,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