From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: soc/tegra: pmc: Move legacy code behind CONFIG_ARM guard Date: Thu, 07 May 2026 13:29:36 +1000 Message-ID: In-Reply-To: <20260506-pmc-v1-9-a6de5da7216b@nvidia.com> References: <20260506-pmc-v1-0-a6de5da7216b@nvidia.com> <20260506-pmc-v1-9-a6de5da7216b@nvidia.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Patch Review Moves the remaining legacy functions (`tegra_pmc_cpu_is_powered`, `tegra_pmc_cpu_power_on`, `tegra_pmc_cpu_remove_clamping`, `tegra_pmc_core_domain_state_synced`, and suspend mode functions) behind `#if defined(CONFIG_ARM)` in both `pmc.c` and `pmc.h`. The `early_pmc` static variable itself is also guarded by `CONFIG_ARM`, and `#if defined(CONFIG_ARM)` blocks are added around the early_pmc usage in `tegra_pmc_probe()`. The `tegra_pmc_early_init()` function and its `early_initcall()` are also moved behind the CONFIG_ARM guard. This means on arm64, the early init code won't run at all -- which is correct since the dynamic allocation in probe handles everything. In `pmc.h`, the header is restructured to separate the instance-aware API (guarded by `CONFIG_SOC_TEGRA_PMC`) from the legacy 32-bit-only API (guarded by `CONFIG_ARM`). The suspend mode stubs are now under `CONFIG_ARM && !(CONFIG_SOC_TEGRA_PMC && CONFIG_PM_SLEEP)`. A `COMPILE_TEST` stub for `tegra_pmc_core_domain_state_synced()` is provided for the `!CONFIG_ARM` case. The `#if defined(CONFIG_ARM)` blocks inside `tegra_pmc_probe()` are a bit ugly (in-function `#ifdef`), but acceptable as a pragmatic solution. An alternative would be a helper function, but the current approach is clear enough. The cover letter mentions "Changes in v2: fix build issue for ARM && !PM_SLEEP" which only appears in this patch's changelog but is formatted as if it's a per-patch note rather than a series-level note. Minor formatting nit. No functional issues. --- Generated by Claude Code Patch Reviewer