|WARNING| [v2,4/4] net/qede: remove unused app version variable

dpdklab at iol.unh.edu dpdklab at iol.unh.edu
Sat Aug 29 18:06:43 CEST 2026


Test-Label: ai-code-review
Test-Status: WARNING
https://dpdk.org/patch/168626

_AI Code Review_

=== Patch Review: series.patch (via Claude) ===
Review date: 2026-08-29

# Review of DPDK Patch Series

## Patch 1/4: common/dpaax: fix unused variable warning in non-debug build

### Errors

None.

### Warnings

None.

### Info

The fix is correct. Using `RTE_SET_USED(cond)` ensures the condition expression is still evaluated (allowing compiler diagnostics like undefined variables or type mismatches) but the result is discarded. This is the standard DPDK pattern for suppressing warnings on conditionally-used variables.

---

## Patch 2/4: bus/dpaa: remove unused qman_clk variable

### Errors

None.

### Warnings

None.

### Info

The change is correct. The `qman_clk` variable is stored from device tree but never read. Removing both the variable and the dead store is appropriate. The warning message from `of_get_property()` returning NULL is still logged, which preserves useful diagnostic information.

---

## Patch 3/4: common/zsda: remove unused device counter

### Errors

None.

### Warnings

None.

### Info

The change is correct. The `zsda_nb_pci_devices` counter is incremented and decremented but never read. All three update sites are safely removed without affecting program logic.

---

## Patch 4/4: net/qede: remove unused app version variable

### Errors

**Error: Missing error check on `qed_read_fw_info()` return value.**

In `qed_dbg_pf_init()` (visible in the context of the patch), the call to `qed_read_fw_info()` returns `bool` to indicate success/failure, but the return value is not checked:

```c
qed_read_fw_info(p_hwfn, p_ptt, &dbg_data->fw_info);
```

This function can fail (returns `false` if the firmware image magic number is invalid or other initialization checks fail). Ignoring the failure means `dbg_data->fw_info` may be left uninitialized or partially initialized, leading to incorrect debug data collection later.

**Suggested fix:** Check the return value and handle the error appropriately (log a warning, skip debug initialization, or fail the device probe).

```c
if (!qed_read_fw_info(p_hwfn, p_ptt, &dbg_data->fw_info)) {
	DP_NOTICE(p_hwfn, false, "Failed to read FW info for debug\n");
	/* Either skip debug init or continue with limited functionality */
}
```

Note: This issue exists in the code before the patch and is not introduced by the patch itself, but since the patch touches this function and the guidelines instruct to review correctness in the modified code, it should be flagged.

### Warnings

None.

### Info

The removal of `qed_dbg_set_app_ver()` is correct. The function validates a version parameter and stores it in `s_app_ver`, but `s_app_ver` is never read. The validation is pointless since the caller always passes `TOOLS_VERSION` (the expected version), making the check always succeed. Removing the entire function and its call eliminates dead code.

---

## Summary

**Patches 1, 2, and 3** are correct with no issues.

**Patch 4** has one pre-existing correctness issue (unchecked `qed_read_fw_info()` return value) that should be addressed. The patch's own changes (removing `qed_dbg_set_app_ver()`) are correct.


More information about the test-report mailing list