Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp945797imw; Tue, 5 Jul 2022 00:39:10 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sRGTqcl4atlr6zGEmDpg5zUIgbaV3pjqSKwv945WehswOGY3Wa7JTtrQiJ+1xaizYixITp X-Received: by 2002:a05:6402:d05:b0:435:b2a6:94eb with SMTP id eb5-20020a0564020d0500b00435b2a694ebmr42920184edb.87.1657006750046; Tue, 05 Jul 2022 00:39:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657006750; cv=none; d=google.com; s=arc-20160816; b=T5z+rJ3hlMTtAfA4LLjBYBO5/A7v9tHLwB76/p/1fOo8QuM8p10bZ30/s3eR91ebUw t5EGlql0OMx0qSJhxvBLze1r1Hy4On67vJlHLZNJ9sQqPOoWsxfIQYdgFcuCWll9iUFE u7cG0pS4f1xa6S4BarvxBdJ+JdRC0ocu7n4zDAZTR2vnS9P47sC1EEIViMEFox2k4XeG jtHxGSA+bUfJnLNpmUyk2GainxzsQnI4gxjWVUU2gsPCTaFsU1wGym7tBgvKZAHvfyo8 Ny+goXfArsRX7w9GWijlrXq1a5rTloTgSMGVZ5HmdXIsVNBZIt70qbydf4/lUCnz7qZv 2+UQ== 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=WWn76D86a1mEcSjBQhlRWmVzJMrbS7iUkVOv/o7W4cI=; b=AJOyKhFHlJxLvqi2pwq+gU2R99hZf/C0UMe4QarMGOZ/H/E+oGhmybEmLj68woSYww GBN9004EuUvA/BfXU9jRrS93b/X/QjTQ5b+QpbBbIOUq4MJ0fFEwKiq3Qu3a5Wug8nax zqJH2QPd2qDpjIEnNzYsStEwuyvruh2/S96nEw+Nz9gHEdJ+fQh4z9W9jLuX9Yx5yeBr PnHzEnnCCS+Am7gQFfaveJw9WARTTJomvf2kt3RLAx6qncbyNYJkoSOlZ5I3rZAkrxha LPgT+aTLhCQaPK1N8KflaRxbdZ3z4cuYLtNWA61uWymzKxK+fAaryAfdVYFShG6vHHwq lWEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HD5eyLpg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h32-20020a0564020ea000b0043a6d32f4bcsi4841855eda.123.2022.07.05.00.38.45; Tue, 05 Jul 2022 00:39:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HD5eyLpg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230265AbiGEHAk (ORCPT + 99 others); Tue, 5 Jul 2022 03:00:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34862 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230240AbiGEHAg (ORCPT ); Tue, 5 Jul 2022 03:00:36 -0400 Received: from mail-pf1-x42b.google.com (mail-pf1-x42b.google.com [IPv6:2607:f8b0:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CEA35E0DD for ; Tue, 5 Jul 2022 00:00:34 -0700 (PDT) Received: by mail-pf1-x42b.google.com with SMTP id i17so1177450pfk.1 for ; Tue, 05 Jul 2022 00:00:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=WWn76D86a1mEcSjBQhlRWmVzJMrbS7iUkVOv/o7W4cI=; b=HD5eyLpgWrbnOGBRxm4GZac5zNe5J7E05Jtue7+jWWXouDjii9avtOLAG41RTfOMi6 /v2so/GVD0HYNac/R414rhUY9VuQO4edOWSAr+3G4Sds19poXf022IdA7MpiNa04zULw Yheudj+5DhT7eokQgA1lpclOp9ikLjF5+yFxyX3zLsfpHEVV6yQd2cCjo49vu/B5T1qn SuAaNG4DJqhUtPQ1ODR9S8Hh8+unobNg8u5O1J7Hoj83NmTo8vsh0H/hTlI0oyYR78uN pQJMn24PqWyW9lWC1hv532xrirqH5CzZJ4Q5sCn/yN77vOvmnYp3UCJ4WhgOI89q4rvi 1izw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=WWn76D86a1mEcSjBQhlRWmVzJMrbS7iUkVOv/o7W4cI=; b=qgAp79fZc5tzniYi31n2JoA+EL9egbPUhsZPLDOqdj1faTw8ONl64wu0HE4EiNbzcj zON5ATfGyiDXIXgsvM5t7S6oTqHKyl/cESsBbIBuDDyieys+AatdFof2RPQndsCfSLoG DJyscQxHgX5NCOGbUUlGhEWbj8N2eKeZZDUDmaoToWkkT/DZRQr2YpmW7tK12wphHCcx KRmieGosOyDxeIMIZZGQD95tPNG8CF/dcA02/IdL61S2eV8wYopmfBwQzEykmUxzEVIa qkr7dP5nBuRVZsY1p6GL8QsqLtOtvTGuOGqbcNEw67aTgp/3N5cMW8kDW/j02NUnJKNs J5+g== X-Gm-Message-State: AJIora9XtpjINOA+OGXG85z5kXMLiN1/v7kqxOff7yOn0DTdW8jHT6Zo 6Uz/AGVavfsbOneCZi+DDNiyzQ== X-Received: by 2002:a63:82c3:0:b0:40c:c340:318d with SMTP id w186-20020a6382c3000000b0040cc340318dmr28886915pgd.191.1657004434244; Tue, 05 Jul 2022 00:00:34 -0700 (PDT) Received: from localhost ([122.171.18.80]) by smtp.gmail.com with ESMTPSA id y6-20020a626406000000b0050dc76281f0sm22093419pfb.202.2022.07.05.00.00.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Jul 2022 00:00:33 -0700 (PDT) From: Viresh Kumar To: Viresh Kumar , Nishanth Menon , Stephen Boyd Cc: Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot , "Rafael J. Wysocki" , Krzysztof Kozlowski , Dmitry Osipenko , linux-kernel@vger.kernel.org Subject: [PATCH V2 01/13] OPP: Use consistent names for OPP table instances Date: Tue, 5 Jul 2022 12:30:04 +0530 Message-Id: <17bd927869b3a4d34c21aadad3536ccdcdf1078f.1657003420.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.31.1.272.g89b43f80a514 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The OPP table is called "opp_table" at most of the places and "table" at few. Make all of them follow the same naming convention, "opp_table". Tested-by: Dmitry Osipenko Signed-off-by: Viresh Kumar --- drivers/opp/core.c | 7 ++++--- drivers/opp/cpu.c | 12 ++++++------ drivers/opp/of.c | 12 ++++++------ 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/drivers/opp/core.c b/drivers/opp/core.c index 5ad43dbfd87f..e836d3043d22 100644 --- a/drivers/opp/core.c +++ b/drivers/opp/core.c @@ -1585,15 +1585,16 @@ void dev_pm_opp_remove_all_dynamic(struct device *dev) } EXPORT_SYMBOL_GPL(dev_pm_opp_remove_all_dynamic); -struct dev_pm_opp *_opp_allocate(struct opp_table *table) +struct dev_pm_opp *_opp_allocate(struct opp_table *opp_table) { struct dev_pm_opp *opp; int supply_count, supply_size, icc_size; /* Allocate space for at least one supply */ - supply_count = table->regulator_count > 0 ? table->regulator_count : 1; + supply_count = opp_table->regulator_count > 0 ? + opp_table->regulator_count : 1; supply_size = sizeof(*opp->supplies) * supply_count; - icc_size = sizeof(*opp->bandwidth) * table->path_count; + icc_size = sizeof(*opp->bandwidth) * opp_table->path_count; /* allocate new OPP node and supplies structures */ opp = kzalloc(sizeof(*opp) + supply_size + icc_size, GFP_KERNEL); diff --git a/drivers/opp/cpu.c b/drivers/opp/cpu.c index 5004335cf0de..3c3506021501 100644 --- a/drivers/opp/cpu.c +++ b/drivers/opp/cpu.c @@ -41,7 +41,7 @@ * the table if any of the mentioned functions have been invoked in the interim. */ int dev_pm_opp_init_cpufreq_table(struct device *dev, - struct cpufreq_frequency_table **table) + struct cpufreq_frequency_table **opp_table) { struct dev_pm_opp *opp; struct cpufreq_frequency_table *freq_table = NULL; @@ -76,7 +76,7 @@ int dev_pm_opp_init_cpufreq_table(struct device *dev, freq_table[i].driver_data = i; freq_table[i].frequency = CPUFREQ_TABLE_END; - *table = &freq_table[0]; + *opp_table = &freq_table[0]; out: if (ret) @@ -94,13 +94,13 @@ EXPORT_SYMBOL_GPL(dev_pm_opp_init_cpufreq_table); * Free up the table allocated by dev_pm_opp_init_cpufreq_table */ void dev_pm_opp_free_cpufreq_table(struct device *dev, - struct cpufreq_frequency_table **table) + struct cpufreq_frequency_table **opp_table) { - if (!table) + if (!opp_table) return; - kfree(*table); - *table = NULL; + kfree(*opp_table); + *opp_table = NULL; } EXPORT_SYMBOL_GPL(dev_pm_opp_free_cpufreq_table); #endif /* CONFIG_CPU_FREQ */ diff --git a/drivers/opp/of.c b/drivers/opp/of.c index 30394929d700..e07fc31de416 100644 --- a/drivers/opp/of.c +++ b/drivers/opp/of.c @@ -767,7 +767,7 @@ void dev_pm_opp_of_remove_table(struct device *dev) } EXPORT_SYMBOL_GPL(dev_pm_opp_of_remove_table); -static int _read_bw(struct dev_pm_opp *new_opp, struct opp_table *table, +static int _read_bw(struct dev_pm_opp *new_opp, struct opp_table *opp_table, struct device_node *np, bool peak) { const char *name = peak ? "opp-peak-kBps" : "opp-avg-kBps"; @@ -780,9 +780,9 @@ static int _read_bw(struct dev_pm_opp *new_opp, struct opp_table *table, return -ENODEV; count = prop->length / sizeof(u32); - if (table->path_count != count) { + if (opp_table->path_count != count) { pr_err("%s: Mismatch between %s and paths (%d %d)\n", - __func__, name, count, table->path_count); + __func__, name, count, opp_table->path_count); return -EINVAL; } @@ -808,7 +808,7 @@ static int _read_bw(struct dev_pm_opp *new_opp, struct opp_table *table, return ret; } -static int _read_opp_key(struct dev_pm_opp *new_opp, struct opp_table *table, +static int _read_opp_key(struct dev_pm_opp *new_opp, struct opp_table *opp_table, struct device_node *np, bool *rate_not_available) { bool found = false; @@ -832,10 +832,10 @@ static int _read_opp_key(struct dev_pm_opp *new_opp, struct opp_table *table, * opp-peak-kBps = ; * opp-avg-kBps = ; */ - ret = _read_bw(new_opp, table, np, true); + ret = _read_bw(new_opp, opp_table, np, true); if (!ret) { found = true; - ret = _read_bw(new_opp, table, np, false); + ret = _read_bw(new_opp, opp_table, np, false); } /* The properties were found but we failed to parse them */ -- 2.31.1.272.g89b43f80a514