coresight: cti-sysfs: Re-use same functions for similar sysfs register accessors
authorJames Clark <james.clark@arm.com>
Tue, 30 Aug 2022 17:26:12 +0000 (18:26 +0100)
committerMathieu Poirier <mathieu.poirier@linaro.org>
Wed, 31 Aug 2022 16:55:53 +0000 (10:55 -0600)
commitfbca79e55429fe0f73b2d2d190fd86bfda52c41b
tree4060a739cdd1b6d9c8575dadf5dfb7a0bce4a74b
parent08e9fa5f3663eaab20ea3430023d1dfbf60d29f5
coresight: cti-sysfs: Re-use same functions for similar sysfs register accessors

Currently each accessor macro creates an identical function which wastes
space in the text area and pollutes the ftrace function name list.
Change it so that the same function is used, but the register to access
is passed in as parameter rather than baked into each function.

Note that only the single accessor is used here and not
csdev_access_relaxed_read_pair() like in the previous commit, so
so a single unsigned offset value is stored instead.

Signed-off-by: James Clark <james.clark@arm.com>
Reviewed-by: Mike Leach <mike.leach@linaro.org>
Link: https://lore.kernel.org/r/20220830172614.340962-5-james.clark@arm.com
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
drivers/hwtracing/coresight/coresight-cti-sysfs.c
drivers/hwtracing/coresight/coresight-priv.h