From: Praveen Talari <praveen.talari@oss.qualcomm.com>
To: Frank Li <Frank.li@oss.nxp.com>, sashiko-reviews@lists.linux.dev
Cc: dmaengine@vger.kernel.org, linux-trace-kernel@vger.kernel.org,
vkoul@kernel.org, Frank.Li@kernel.org
Subject: Re: [PATCH v3 2/2] dmaengine: qcom: gpi: Convert dev_dbg() calls to tracepoints
Date: Fri, 16 Oct 2026 15:49:14 +0530 [thread overview]
Message-ID: <7337fb06-0953-42f6-acdf-ccd29549fd8b@oss.qualcomm.com> (raw)
In-Reply-To: <as6nEloHzo_YkEW9@lizhi-Precision-Tower-5810>
Hi Frank Li
On 14-10-2026 03:18, Frank Li wrote:
> On Fri, Sep 25, 2026 at 09:02:44PM +0000, sashiko-bot@kernel.org 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 <praveen.talari@oss.qualcomm.com>
>>
>> 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-8572bf7456b2@oss.qualcomm.com?part=2
prev parent reply other threads:[~2026-10-16 10:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-25 20:51 [PATCH v3 0/2] dmaengine: qcom: gpi: Add trace event support Praveen Talari
2026-09-25 20:51 ` [PATCH v3 1/2] " Praveen Talari
2026-09-25 21:02 ` sashiko-bot
2026-10-13 21:44 ` Frank Li
2026-09-25 20:51 ` [PATCH v3 2/2] dmaengine: qcom: gpi: Convert dev_dbg() calls to tracepoints Praveen Talari
2026-09-25 21:02 ` sashiko-bot
2026-10-13 21:48 ` Frank Li
2026-10-16 10:19 ` Praveen Talari [this message]
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=7337fb06-0953-42f6-acdf-ccd29549fd8b@oss.qualcomm.com \
--to=praveen.talari@oss.qualcomm.com \
--cc=Frank.Li@kernel.org \
--cc=Frank.li@oss.nxp.com \
--cc=dmaengine@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=vkoul@kernel.org \
/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