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, 28 Apr 2026 14:49:22 +1000 Message-ID: In-Reply-To: <20260427095603.1157963-4-sumit.garg@kernel.org> References: <20260427095603.1157963-1-sumit.garg@kernel.org> <20260427095603.1157963-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 is the transitional patch that adds SCM as a backend and maintains backwards-compatible wrappers. The approach is clean: internal functions get a `struct device *dev` parameter (instead of using the global `__scm->dev`), and thin wrappers maintain the old API. **Type-punning via casts.** The patch casts between `qcom_scm_pas_context *` and `qcom_pas_context *`: ```c return (struct qcom_scm_pas_context *)ctx; ``` This is safe because `qcom_pas_context` is defined identically to the old `qcom_scm_pas_context` (same fields, same order), but it's a C strict-aliasing violation in principle. Since patch 14 removes all of this, it's acceptable as a transitional measure. **Naming inconsistency.** Functions are renamed with double-underscore prefix and a "2" suffix (`__qcom_scm_pas_init_image2`, `__qcom_scm_pas_get_rsc_table2`), which is ugly but temporary -- patch 14 cleans this up. --- Generated by Claude Code Patch Reviewer