public inbox for drm-ai-reviews@public-inbox.freedesktop.org
 help / color / mirror / Atom feed
From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: firmware: qcom: Add a PAS TEE service
Date: Fri, 13 Mar 2026 14:26:32 +1000	[thread overview]
Message-ID: <review-patch4-20260312062756.694390-5-sumit.garg@kernel.org> (raw)
In-Reply-To: <20260312062756.694390-5-sumit.garg@kernel.org>

Patch Review

The OP-TEE backend implementation. Notes:

**Error message copy-paste bug in `qcom_pas_tee_set_remote_state()`.** At `qcom_pas_tee.c:351`:
```c
dev_err(dev, "PAS shutdown failed, pas_id: %d, err: %x\n",
```
This function sets remote state, not shutdown. The error message should say "PAS set remote state failed".

**`qcom_pas_tee_get_rsc_table()` — first invocation with NULL shm.** The first `tee_client_invoke_func` call at line 235 is done with `param[1].u.memref.shm` left as NULL/zero (no shm is set), only `param[1].u.memref.size = input_rt_size`. This appears to be a size query, but it's not well-documented. If `input_rt_size` is 0, `param[1]` is MEMREF_INOUT with size 0 and no shm — behavior depends on the OP-TEE PTA implementation.

**Missing NULL check after `tee_shm_get_va` returns non-ERR NULL.** At line 254:
```c
if (IS_ERR_OR_NULL(rt_shm_va)) {
```
Good — handles both ERR and NULL. But should it log which case occurred?

**`ret = 0` initialization in `qcom_pas_tee_shutdown()` is unnecessary** since `ret` is immediately assigned from `tee_client_invoke_func`.

**`DEFINE_FREE(shm_free, ...)` scope.** The `__free(shm_free)` cleanup is used for `rt_shm` inside `qcom_pas_tee_get_rsc_table()`. This means the shm is freed when it goes out of scope, which is correct since the data is copied to `rt_buf` via `kmalloc`+`memcpy`. Good pattern.

**No `data->dev` is actually used.** The `qcom_pas_tee_private` struct has a `dev` field, but it's never assigned or used — `dev` is always obtained from the function parameter.

---
Generated by Claude Code Patch Reviewer

  reply	other threads:[~2026-03-13  4:26 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-12  6:27 [PATCH v2 00/15] firmware: qcom: Add OP-TEE PAS service support Sumit Garg
2026-03-12  6:27 ` [PATCH v2 01/15] arm64: dts: qcom: kodiak: Add EL2 overlay Sumit Garg
2026-03-13  4:26   ` Claude review: " Claude Code Review Bot
2026-03-12  6:27 ` [PATCH v2 02/15] firmware: qcom: Add a generic PAS service Sumit Garg
2026-03-13  4:26   ` Claude review: " Claude Code Review Bot
2026-03-12  6:27 ` [PATCH v2 03/15] firmware: qcom_scm: Migrate to " Sumit Garg
2026-03-13  4:26   ` Claude review: " Claude Code Review Bot
2026-03-12  6:27 ` [PATCH v2 04/15] firmware: qcom: Add a PAS TEE service Sumit Garg
2026-03-13  4:26   ` Claude Code Review Bot [this message]
2026-03-12  6:27 ` [PATCH v2 05/15] remoteproc: qcom_q6v5_pas: Switch over to generic PAS TZ APIs Sumit Garg
2026-03-13  4:26   ` Claude review: " Claude Code Review Bot
2026-03-12  6:27 ` [PATCH v2 06/15] remoteproc: qcom_q6v5_mss: Switch " Sumit Garg
2026-03-13  4:26   ` Claude review: " Claude Code Review Bot
2026-03-12  6:27 ` [PATCH v2 07/15] soc: qcom: mdtloader: " Sumit Garg
2026-03-13  4:26   ` Claude review: " Claude Code Review Bot
2026-03-12  6:27 ` [PATCH v2 08/15] remoteproc: qcom_wcnss: " Sumit Garg
2026-03-13  4:26   ` Claude review: " Claude Code Review Bot
2026-03-12  6:27 ` [PATCH v2 09/15] remoteproc: qcom: Select QCOM_PAS_TEE service backend Sumit Garg
2026-03-13  4:26   ` Claude review: " Claude Code Review Bot
2026-03-12  6:27 ` [PATCH v2 10/15] drm/msm: Switch to generic PAS TZ APIs Sumit Garg
2026-03-13  4:26   ` Claude review: " Claude Code Review Bot
2026-03-12  6:27 ` [PATCH v2 11/15] media: qcom: " Sumit Garg
2026-03-13  4:26   ` Claude review: " Claude Code Review Bot
2026-03-12  6:27 ` [PATCH v2 12/15] net: ipa: " Sumit Garg
2026-03-13  4:26   ` Claude review: " Claude Code Review Bot
2026-03-12  6:27 ` [PATCH v2 13/15] wifi: ath12k: " Sumit Garg
2026-03-13  4:26   ` Claude review: " Claude Code Review Bot
2026-03-12  6:27 ` [PATCH v2 14/15] firmware: qcom_scm: Remove SCM PAS wrappers Sumit Garg
2026-03-13  4:26   ` Claude review: " Claude Code Review Bot
2026-03-12  6:27 ` [PATCH v2 15/15] MAINTAINERS: Add maintainer entry for Qualcomm PAS TZ service Sumit Garg
2026-03-13  4:26   ` Claude review: " Claude Code Review Bot
2026-03-13  4:26 ` Claude review: firmware: qcom: Add OP-TEE PAS service support Claude Code Review Bot
  -- strict thread matches above, loose matches on Subject: below --
2026-03-06 10:50 [PATCH 00/14] " Sumit Garg
2026-03-06 10:50 ` [PATCH 04/14] firmware: qcom: Add a PAS TEE service Sumit Garg
2026-03-08 22:59   ` Claude review: " Claude Code Review Bot

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=review-patch4-20260312062756.694390-5-sumit.garg@kernel.org \
    --to=claude-review@example.com \
    --cc=dri-devel-reviews@example.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