Hi Frank Li
On 14-10-2026 03:18, Frank Li wrote:
On Fri, Sep 25, 2026 at 09:02:44PM +0000, [email protected] wrote:
Thank you for your contribution! Sashiko AI review found 1 potential issue(s)
to consider:
- [Low] dmaengine: qcom: gpi: unused variable gpi_ev_state_str causes compiler
warning
--
commit 16ff3240f7873902688743d98570cd5eebf13594
Author: Praveen Talari <[email protected]>
dmaengine: qcom: gpi: Convert dev_dbg() calls to tracepoints
This commit replaces dev_dbg() based debug logging in the GPI DMA driver
with tracepoints, providing structured runtime visibility.
diff --git a/drivers/dma/qcom/gpi.c b/drivers/dma/qcom/gpi.c
index fafe6ac848d94..6aff2a0d54161 100644
--- a/drivers/dma/qcom/gpi.c
+++ b/drivers/dma/qcom/gpi.c
[ ... ]
@@ -887,15 +883,14 @@ static irqreturn_t gpi_handle_irq(int irq, void *data)
ev_state = DEFAULT_EV_CH_STATE;
gpii->ev_state = ev_state;
- dev_dbg(gpii->gpi_dev->dev, "setting EV state to %s\n",
- TO_GPI_EV_STATE_STR(gpii->ev_state));
+ trace_gpi_ev_ctrl_irq(gpii->gpi_dev->dev, gpii_id,
ev_ch_irq,
+ gpii->ev_state);
[Severity: Low]
Is it possible that this change in gpi_handle_irq() within
drivers/dma/qcom/gpi.c leaves the gpi_ev_state_str static array and
TO_GPI_EV_STATE_STR macro as orphaned dead code?
Since trace_gpi_ev_ctrl_irq() only takes the integer value, the final
consumer of the macro is removed. Could this regression trigger a
-Wunused-variable compiler warning for the unreferenced static array
when compiling the driver with standard kernel warning flags enabled?
For reference, the array is defined earlier in the file as:
static const char *const gpi_ev_state_str[MAX_EV_STATES] = {
[EV_STATE_NOT_ALLOCATED] = "NOT ALLOCATED",
[EV_STATE_ALLOCATED] = "ALLOCATED",
};
Please Remove dead code also.
Thanks for pointing this out. I can reuse gpi_ev_state_str in the trace
output instead of removing it. I’ll update the patch accordingly.
Thanks,
Praveen Talari
Frank
#define TO_GPI_EV_STATE_STR(_state) (((_state) >= MAX_EV_STATES) ? \
"INVALID" : gpi_ev_state_str[(_state)])
--
Sashiko AI review ·
https://sashiko.dev/#/patchset/20260926-add-trace-support-gpio-v3-0-8572bf745...@oss.qualcomm.com?part=2