Commit 4501b0dc authored by Nathan Chancellor's avatar Nathan Chancellor Committed by huangfangrun
Browse files

coresight: cti-sysfs: Mark coresight_cti_reg_store() as __maybe_unused

mainline inclusion
from mainline-v6.1-rc1
commit 269e633d
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I6XLGY
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=269e633dad16c951449c99cc3bfce46110f5029e



----------------------------------------------------------------------

When building without CONFIG_CORESIGHT_CTI_INTEGRATION_REGS, there is a
warning about coresight_cti_reg_store() being unused in the file:

  drivers/hwtracing/coresight/coresight-cti-sysfs.c:184:16: warning: 'coresight_cti_reg_store' defined but not used [-Wunused-function]
    184 | static ssize_t coresight_cti_reg_store(struct device *dev,
        |                ^~~~~~~~~~~~~~~~~~~~~~~

This is expected as coresight_cti_reg_store() is only used in the
coresight_cti_reg_rw macro, which is only used in a block guarded by
CONFIG_CORESIGHT_CTI_INTEGRATION_REGS. Mark coresight_cti_reg_store() as
__maybe_unused to clearly indicate that the function may be unused
depending on the configuration.

Fixes: fbca79e5 ("coresight: cti-sysfs: Re-use same functions for similar sysfs register accessors")
Signed-off-by: default avatarNathan Chancellor <nathan@kernel.org>
Reviewed-by: default avatarJames Clark <james.clark@arm.com>
Link: https://lore.kernel.org/r/20220901195055.1932340-1-nathan@kernel.org


Signed-off-by: default avatarMathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: default avatarhuangfangrun <huangfangrun1@h-partners.com>
parent 4db8a9d4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment