[PATCH 5/8] coresight: cti: Rename cti_active() to cti_is_active()
Mike Leach
Mike.Leach at arm.com
Fri Feb 20 05:47:21 PST 2026
> -----Original Message-----
> From: Leo Yan <leo.yan at arm.com>
> Sent: Monday, February 9, 2026 6:01 PM
> To: Suzuki Poulose <Suzuki.Poulose at arm.com>; Mike Leach
> <Mike.Leach at arm.com>; James Clark <james.clark at linaro.org>; Alexander
> Shishkin <alexander.shishkin at linux.intel.com>; Greg Kroah-Hartman
> <gregkh at linuxfoundation.org>; Mathieu Poirier
> <mathieu.poirier at linaro.org>; Tingwei Zhang <quic_tingwei at quicinc.com>;
> Yingchao Deng <yingchao.deng at oss.qualcomm.com>; Jie Gan
> <jie.gan at oss.qualcomm.com>
> Cc: coresight at lists.linaro.org; linux-arm-kernel at lists.infradead.org; linux-
> kernel at vger.kernel.org; Leo Yan <Leo.Yan at arm.com>
> Subject: [PATCH 5/8] coresight: cti: Rename cti_active() to cti_is_active()
>
> Rename cti_active() to cti_is_active() to clarify that it checks whether
> the CTI device is active.
>
> Signed-off-by: Leo Yan <leo.yan at arm.com>
> ---
> drivers/hwtracing/coresight/coresight-cti-core.c | 8 ++++----
> drivers/hwtracing/coresight/coresight-cti-sysfs.c | 14 +++++++-------
> drivers/hwtracing/coresight/coresight-cti.h | 2 +-
> 3 files changed, 12 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/hwtracing/coresight/coresight-cti-core.c
> b/drivers/hwtracing/coresight/coresight-cti-core.c
> index
> 3becef607e5ec5225cb6fd616da804903651fdf1..48db87e2fd0f1a669f2d20
> a0014108da215e26fd 100644
> --- a/drivers/hwtracing/coresight/coresight-cti-core.c
> +++ b/drivers/hwtracing/coresight/coresight-cti-core.c
> @@ -164,7 +164,7 @@ void cti_write_intack(struct device *dev, u32 ackval)
> guard(raw_spinlock_irqsave)(&drvdata->spinlock);
>
> /* write if enabled */
> - if (cti_active(config))
> + if (cti_is_active(config))
> cti_write_single_reg(drvdata, CTIINTACK, ackval);
> }
>
> @@ -351,7 +351,7 @@ int cti_channel_trig_op(struct device *dev, enum
> cti_chan_op op,
> config->ctiouten[trigger_idx] = reg_value;
>
> /* write through if enabled */
> - if (cti_active(config))
> + if (cti_is_active(config))
> cti_write_single_reg(drvdata, reg_offset, reg_value);
>
> return 0;
> @@ -389,7 +389,7 @@ int cti_channel_gate_op(struct device *dev, enum
> cti_chan_gate_op op,
> }
> if (err == 0) {
> config->ctigate = reg_value;
> - if (cti_active(config))
> + if (cti_is_active(config))
> cti_write_single_reg(drvdata, CTIGATE, reg_value);
> }
>
> @@ -438,7 +438,7 @@ int cti_channel_setop(struct device *dev, enum
> cti_chan_set_op op,
> break;
> }
>
> - if ((err == 0) && cti_active(config))
> + if ((err == 0) && cti_is_active(config))
> cti_write_single_reg(drvdata, reg_offset, reg_value);
>
> return err;
> diff --git a/drivers/hwtracing/coresight/coresight-cti-sysfs.c
> b/drivers/hwtracing/coresight/coresight-cti-sysfs.c
> index
> c15a580f6e90f57b1376e0b883a27700966feb1a..a22cc9a2bee24eb6115e7
> adb61880cc86d03e12e 100644
> --- a/drivers/hwtracing/coresight/coresight-cti-sysfs.c
> +++ b/drivers/hwtracing/coresight/coresight-cti-sysfs.c
> @@ -268,7 +268,7 @@ static ssize_t cti_reg32_show(struct device *dev, char
> *buf,
> struct cti_config *config = &drvdata->config;
>
> scoped_guard(raw_spinlock_irqsave, &drvdata->spinlock) {
> - if ((reg_offset >= 0) && cti_active(config)) {
> + if ((reg_offset >= 0) && cti_is_active(config)) {
> val = cti_read_single_reg(drvdata, reg_offset);
> if (pcached_val)
> *pcached_val = val;
> @@ -301,7 +301,7 @@ static ssize_t cti_reg32_store(struct device *dev,
> const char *buf,
> *pcached_val = (u32)val;
>
> /* write through if offset and enabled */
> - if ((reg_offset >= 0) && cti_active(config))
> + if ((reg_offset >= 0) && cti_is_active(config))
> cti_write_single_reg(drvdata, reg_offset, val);
> }
>
> @@ -393,7 +393,7 @@ static ssize_t inen_store(struct device *dev,
> config->ctiinen[index] = val;
>
> /* write through if enabled */
> - if (cti_active(config))
> + if (cti_is_active(config))
> cti_write_single_reg(drvdata, CTIINEN(index), val);
>
> return size;
> @@ -434,7 +434,7 @@ static ssize_t outen_store(struct device *dev,
> config->ctiouten[index] = val;
>
> /* write through if enabled */
> - if (cti_active(config))
> + if (cti_is_active(config))
> cti_write_single_reg(drvdata, CTIOUTEN(index), val);
>
> return size;
> @@ -476,7 +476,7 @@ static ssize_t appclear_store(struct device *dev,
> config->ctiappset &= ~val;
>
> /* write through if enabled */
> - if (cti_active(config))
> + if (cti_is_active(config))
> cti_write_single_reg(drvdata, CTIAPPCLEAR, val);
>
> return size;
> @@ -497,7 +497,7 @@ static ssize_t apppulse_store(struct device *dev,
> guard(raw_spinlock_irqsave)(&drvdata->spinlock);
>
> /* write through if enabled */
> - if (cti_active(config))
> + if (cti_is_active(config))
> cti_write_single_reg(drvdata, CTIAPPPULSE, val);
>
> return size;
> @@ -763,7 +763,7 @@ static ssize_t chan_xtrigs_reset_store(struct device
> *dev,
> config->xtrig_rchan_sel = 0;
>
> /* if enabled then write through */
> - if (cti_active(config))
> + if (cti_is_active(config))
> cti_write_all_hw_regs(drvdata);
>
> return size;
> diff --git a/drivers/hwtracing/coresight/coresight-cti.h
> b/drivers/hwtracing/coresight/coresight-cti.h
> index
> 7a3e7f806dcb093e504f1aacb3b29564bea28f6c..400c1545b22bfe631144d
> 24faceb354ff2d49166 100644
> --- a/drivers/hwtracing/coresight/coresight-cti.h
> +++ b/drivers/hwtracing/coresight/coresight-cti.h
> @@ -238,7 +238,7 @@ coresight_cti_get_platform_data(struct device *dev);
> const char *cti_plat_get_node_name(struct fwnode_handle *fwnode);
>
> /* cti powered and enabled */
> -static inline bool cti_active(struct cti_config *cfg)
> +static inline bool cti_is_active(struct cti_config *cfg)
> {
> return cfg->hw_powered && cfg->hw_enabled;
> }
>
> --
> 2.34.1
Reviewed-by: Mike Leach <mike.leach at arm.com>
More information about the linux-arm-kernel
mailing list