From: Sumit Gupta <sumitg@nvidia.com>
To: <krzk@kernel.org>, <treding@nvidia.com>, <jonathanh@nvidia.com>,
<linux-kernel@vger.kernel.org>, <linux-tegra@vger.kernel.org>
Cc: <bbasu@nvidia.com>, <sumitg@nvidia.com>
Subject: [PATCH 2/3] memory: tegra264: drop redundant tegra264_mc_icc_aggregate()
Date: Wed, 27 May 2026 19:31:26 +0530 [thread overview]
Message-ID: <20260527140127.49172-3-sumitg@nvidia.com> (raw)
In-Reply-To: <20260527140127.49172-1-sumitg@nvidia.com>
tegra264_mc_icc_aggregate() does nothing on top of icc_std_aggregate
except an early return on !mc->bwmgr_mrq_supported.
tegra264_mc_icc_set() already returns early on the same condition,
before reading any of the aggregated avg_bw / peak_bw values. This
makes the early return in aggregate() redundant. So, set
tegra264_mc_icc_ops.aggregate to icc_std_aggregate and drop the
helper.
Reported-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Sumit Gupta <sumitg@nvidia.com>
---
drivers/memory/tegra/tegra264.c | 17 +----------------
1 file changed, 1 insertion(+), 16 deletions(-)
diff --git a/drivers/memory/tegra/tegra264.c b/drivers/memory/tegra/tegra264.c
index e43ef14da1ee..bad7d61165b0 100644
--- a/drivers/memory/tegra/tegra264.c
+++ b/drivers/memory/tegra/tegra264.c
@@ -295,21 +295,6 @@ static int tegra264_mc_icc_set(struct icc_node *src, struct icc_node *dst)
return ret;
}
-static int tegra264_mc_icc_aggregate(struct icc_node *node, u32 tag, u32 avg_bw,
- u32 peak_bw, u32 *agg_avg, u32 *agg_peak)
-{
- struct icc_provider *p = node->provider;
- struct tegra_mc *mc = icc_provider_to_tegra_mc(p);
-
- if (!mc->bwmgr_mrq_supported)
- return 0;
-
- *agg_avg += avg_bw;
- *agg_peak = max(*agg_peak, peak_bw);
-
- return 0;
-}
-
static int tegra264_mc_icc_get_init_bw(struct icc_node *node, u32 *avg, u32 *peak)
{
*avg = 0;
@@ -626,7 +611,7 @@ static const irq_handler_t tegra264_mc_irq_handlers[8] = {
static const struct tegra_mc_icc_ops tegra264_mc_icc_ops = {
.xlate = tegra_mc_icc_xlate,
- .aggregate = tegra264_mc_icc_aggregate,
+ .aggregate = icc_std_aggregate,
.get_bw = tegra264_mc_icc_get_init_bw,
.set = tegra264_mc_icc_set,
};
--
2.34.1
next prev parent reply other threads:[~2026-05-27 14:02 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-27 14:01 [PATCH 0/3] memory: tegra: UBSAN fix and cleanups Sumit Gupta
2026-05-27 14:01 ` [PATCH 1/3] memory: tegra186-emc: stop borrowing MC aggregate hook for EMC Sumit Gupta
2026-06-09 15:01 ` Krzysztof Kozlowski
2026-06-09 15:07 ` Jon Hunter
2026-06-09 15:08 ` Krzysztof Kozlowski
2026-05-27 14:01 ` Sumit Gupta [this message]
2026-05-27 14:01 ` [PATCH 3/3] memory: tegra234: drop dead NULL check in tegra234_mc_icc_aggregate() Sumit Gupta
2026-06-09 14:51 ` [PATCH 0/3] memory: tegra: UBSAN fix and cleanups Jon Hunter
2026-06-09 15:02 ` Krzysztof Kozlowski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260527140127.49172-3-sumitg@nvidia.com \
--to=sumitg@nvidia.com \
--cc=bbasu@nvidia.com \
--cc=jonathanh@nvidia.com \
--cc=krzk@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=treding@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox