Thread (7 messages) 7 messages, 3 authors, 1d ago

Re: [PATCH v3 2/2] dmaengine: qcom: gpi: Convert dev_dbg() calls to tracepoints

flat view

From: sashiko-bot@kernel.org
Date: 2026-09-25 21:02:45
Also in: dmaengine

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 [off-list ref]

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.
quoted hunk ↗ jump to hunk
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
[ ... ]
quoted hunk ↗ jump to hunk
@@ -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",
};

#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-8572bf7456b2@oss.qualcomm.com?part=2
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help