From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: firmware: qcom_scm: Migrate to generic PAS service Date: Tue, 05 May 2026 08:22:44 +1000 Message-ID: In-Reply-To: <20260504130603.1474043-4-sumit.garg@kernel.org> References: <20260504130603.1474043-1-sumit.garg@kernel.org> <20260504130603.1474043-4-sumit.garg@kernel.org> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Patch Review This refactors the existing SCM PAS functions into `__`-prefixed static functions that take a `struct device *dev` parameter (instead of using the global `__scm->dev`), then wires them up as a `qcom_pas_ops` backend. The old exported wrappers are kept as thin redirectors for the transition period. **Observation on cast pattern:** ```c return (struct qcom_scm_pas_context *)ctx; ``` The `qcom_scm_pas_context` and `qcom_pas_context` structs are layout-identical, so this is safe, but it's a maintenance hazard. This is cleaned up in patch 15, so it's acceptable as a transitional step. The intermediate naming (`__qcom_scm_pas_init_image2`, `__qcom_scm_pas_get_rsc_table2`) is a bit awkward but is similarly cleaned up later. **Registration during probe:** ```c if (qcom_scm_is_pas_available()) { qcom_pas_ops_scm.dev = scm->dev; qcom_pas_ops_register(&qcom_pas_ops_scm); } ``` Setting `.dev` on a static struct just before registering works, but the non-atomicity of the two-step (set `.dev`, then register) is fine here since there's only one SCM platform device. No functional issues. --- --- Generated by Claude Code Patch Reviewer