From patchwork Thu Jul 16 02:54:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Walter Lozano X-Patchwork-Id: 11666557 X-Patchwork-Delegate: viresh.linux@gmail.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E96981392 for ; Thu, 16 Jul 2020 02:55:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D0DD92076C for ; Thu, 16 Jul 2020 02:55:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727036AbgGPCzD (ORCPT ); Wed, 15 Jul 2020 22:55:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53266 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727034AbgGPCzC (ORCPT ); Wed, 15 Jul 2020 22:55:02 -0400 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B6524C061755; Wed, 15 Jul 2020 19:55:02 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: wlozano) with ESMTPSA id ED2ED2A3753 From: Walter Lozano To: linux-pm@vger.kernel.org Cc: kernel@collabora.com, Walter Lozano , Nishanth Menon , Stephen Boyd , Viresh Kumar , linux-kernel@vger.kernel.org Subject: [PATCH] opp: Increase parsed_static_opps on _of_add_opp_table_v1 Date: Wed, 15 Jul 2020 23:54:52 -0300 Message-Id: <20200716025452.25761-1-walter.lozano@collabora.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Currently, when using _of_add_opp_table_v2 parsed_static_opps is increased and this value is used on _opp_remove_all_static to check if there are static opps entries that need to be freed. Unfortunately this does not happens when using _of_add_opp_table_v1, which leads to warnings. This patch increases parsed_static_opps on _of_add_opp_table_v1 in a similar way as in _of_add_opp_table_v2. Signed-off-by: Walter Lozano --- drivers/opp/of.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/opp/of.c b/drivers/opp/of.c index 9a5873591a40..b2bc82bf8b42 100644 --- a/drivers/opp/of.c +++ b/drivers/opp/of.c @@ -917,6 +917,8 @@ static int _of_add_opp_table_v1(struct device *dev, struct opp_table *opp_table) nr -= 2; } + opp_table->parsed_static_opps++; + return ret; }