DMA Engine development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Praveen Talari" <praveen.talari@oss.qualcomm.com>
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, 25 Sep 2026 21:02:44 +0000	[thread overview]
Message-ID: <20260925210244.D6D5F1F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260926-add-trace-support-gpio-v3-2-8572bf7456b2@oss.qualcomm.com>

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",
};

#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

      reply	other threads:[~2026-09-25 21:02 UTC|newest]

Thread overview: 5+ 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-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 [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=20260925210244.D6D5F1F000FF@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=Frank.Li@kernel.org \
    --cc=dmaengine@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=praveen.talari@oss.qualcomm.com \
    --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