From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: bus: mhi: Load DDR training data using per-device serial number Date: Mon, 09 Mar 2026 08:09:01 +1000 Message-ID: In-Reply-To: <20260307-sahara_protocol_new_v2-v2-6-29dc748b5e9c@oss.qualcomm.com> References: <20260307-sahara_protocol_new_v2-v2-0-29dc748b5e9c@oss.qualcomm.com> <20260307-sahara_protocol_new_v2-v2-6-29dc748b5e9c@oss.qualcomm.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Patch Review - **Hardcoded image ID 34 for DDR training:** ```c +#define SAHARA_DDR_TRAINING_IMG_ID 34 ``` This is the same index as `qdu100_image_table[34] = "qcom/qdu100/mdmddr.mbn"`. The relationship between the define and the table entry isn't documented. - **Duplicated firmware request logic.** The DDR training special case and the normal path both call `firmware_request_nowarn` with similar error handling but the code is largely duplicated. The original concise code is now ~40 lines with nested if/else blocks. Consider refactoring to reduce duplication. - **Comment typo preserved:** `"an a problem"` from the original code is still present in the else branch (line 2994-2995). - **Missing `return 0` for successful DDR training path.** After the serial-number firmware is found and `context->firmware` is set, the function falls through to `context->active_image_id = image_id` correctly, but the flow is not immediately obvious. --- Generated by Claude Code Patch Reviewer