diff options
author | James Clark <james.clark@arm.com> | 2022-03-04 20:19:11 +0300 |
---|---|---|
committer | Mathieu Poirier <mathieu.poirier@linaro.org> | 2022-04-13 20:05:50 +0300 |
commit | 67493ca4cbe7e8335b94dfe71b12eae79a07b8b8 (patch) | |
tree | ecf8dd9e0be65c5f131883f140ebb9a9b1b9bb5e /drivers/hwtracing/coresight/coresight-etm4x-sysfs.c | |
parent | 66192082e78a9d346eefd05c0539d31ab45757f9 (diff) | |
download | linux-67493ca4cbe7e8335b94dfe71b12eae79a07b8b8.tar.xz |
coresight: etm4x: Cleanup TRCBBCTLR register accesses
This is a no-op change for style and consistency and has no effect on
the binary output by the compiler. In sysreg.h fields are defined as
the register name followed by the field name and then _MASK. This
allows for grepping for fields by name rather than using magic numbers.
Signed-off-by: James Clark <james.clark@arm.com>
Reviewed-by: Mike Leach <mike.leach@linaro.org>
Link: https://lore.kernel.org/r/20220304171913.2292458-15-james.clark@arm.com
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Diffstat (limited to 'drivers/hwtracing/coresight/coresight-etm4x-sysfs.c')
-rw-r--r-- | drivers/hwtracing/coresight/coresight-etm4x-sysfs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c b/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c index 25f76a656308..3ae6f4432646 100644 --- a/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c +++ b/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c @@ -707,10 +707,10 @@ static ssize_t bb_ctrl_store(struct device *dev, * individual range comparators. If include then at least 1 * range must be selected. */ - if ((val & BIT(8)) && (BMVAL(val, 0, 7) == 0)) + if ((val & TRCBBCTLR_MODE) && (FIELD_GET(TRCBBCTLR_RANGE_MASK, val) == 0)) return -EINVAL; - config->bb_ctrl = val & GENMASK(8, 0); + config->bb_ctrl = val & (TRCBBCTLR_MODE | TRCBBCTLR_RANGE_MASK); return size; } static DEVICE_ATTR_RW(bb_ctrl); |