Re: [PATCH v10 8/8] coresight: etm3x: introduce struct etm_caps

From: sashiko-bot

Date: Fri Sep 11 2026 - 07:28:53 EST


Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The local variable `caps` in `cntr_val_show()` is declared and initialized but never used, leading to a compiler warning.
--

commit 95d091834d6fbb955b9c3143fee9373f3398b6c9
Author: Yeoreum Yun <yeoreum.yun@xxxxxxx>

coresight: etm3x: introduce struct etm_caps

Introduce struct etm_caps to describe ETMv3 capabilities
and move capabilities information into it.

> diff --git a/drivers/hwtracing/coresight/coresight-etm3x-sysfs.c b/drivers/hwtracing/coresight/coresight-etm3x-sysfs.c
> index 0701edc094581..6c911b8c1be96 100644
> --- a/drivers/hwtracing/coresight/coresight-etm3x-sysfs.c
> +++ b/drivers/hwtracing/coresight/coresight-etm3x-sysfs.c
[ ... ]
> @@ -719,6 +724,7 @@ static ssize_t cntr_val_show(struct device *dev,
> {
> u32 val;
> struct etm_drvdata *drvdata = dev_get_drvdata(dev->parent);
> + const struct etm_caps *caps = &drvdata->caps;

[Severity: Low]
Is this caps variable necessary? It appears to be declared and initialized
but never used in cntr_val_show(), which might cause a compiler warning.

> struct etm_config *config = &drvdata->config;
>
> if (!coresight_get_mode(drvdata->csdev)) {

--
Sashiko AI review · https://sashiko.dev/#/patchset/20260911-separate_etm_cfg_v2-v10-0-1b715d95927a@xxxxxxx?part=8