From patchwork Wed Sep 1 12:28:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 505557 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2669BC00143 for ; Wed, 1 Sep 2021 12:50:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1190860E98 for ; Wed, 1 Sep 2021 12:50:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344538AbhIAMu5 (ORCPT ); Wed, 1 Sep 2021 08:50:57 -0400 Received: from mail.kernel.org ([198.145.29.99]:49844 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345141AbhIAMsN (ORCPT ); Wed, 1 Sep 2021 08:48:13 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7D5256115B; Wed, 1 Sep 2021 12:40:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1630500028; bh=uICdctrZDG7chxVYHm4pT2aNQKVTK9JiuHzWHULc8xk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IdzSa6KdbyUnlA0g8V0O+0KPsfox+v3hzHWlswCkCxyi90Qy6nvNHIJLhGAvj1+jP u4629MGPcfsqyeGpetY4zSB3m1yT1CEkiVeSjBCPNfJiusPxI07WNKDEyFjF1dUrfs tLxQ5qIeAA4tJ2Wh+Q/AjO9F/sApV+DDuaqlQ+LU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= , Viresh Kumar , Sasha Levin Subject: [PATCH 5.13 076/113] opp: remove WARN when no valid OPPs remain Date: Wed, 1 Sep 2021 14:28:31 +0200 Message-Id: <20210901122304.523261226@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210901122301.984263453@linuxfoundation.org> References: <20210901122301.984263453@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Michał Mirosław [ Upstream commit 335ffab3ef864539e814b9a2903b0ae420c1c067 ] This WARN can be triggered per-core and the stack trace is not useful. Replace it with plain dev_err(). Fix a comment while at it. Signed-off-by: Michał Mirosław Signed-off-by: Viresh Kumar Signed-off-by: Sasha Levin --- drivers/opp/of.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/opp/of.c b/drivers/opp/of.c index c582a9ca397b..01feeba78426 100644 --- a/drivers/opp/of.c +++ b/drivers/opp/of.c @@ -985,8 +985,9 @@ static int _of_add_opp_table_v2(struct device *dev, struct opp_table *opp_table) } } - /* There should be one of more OPP defined */ - if (WARN_ON(!count)) { + /* There should be one or more OPPs defined */ + if (!count) { + dev_err(dev, "%s: no supported OPPs", __func__); ret = -ENOENT; goto remove_static_opp; }