Skip to contentSkip to conversation

arch/x86/events/intel/core.c:4145:1: sparse: symbol 'dev_attr_allow_tsx_force_abort' was not declared. Should it be static?

DISCUSSION kbuild test robot 2 participants 3 messages Mar 13, 2019 – Mar 17, 2019

Subsystems (2)
lore
Share & tools
lore
author build bot
#1 lore raw

[RFC PATCH linus] perf/x86/intel: dev_attr_allow_tsx_force_abort can be static

In reply to kbuild test robot
Fixes: 400816f60c54 ("perf/x86/intel: Implement support for TSX Force Abort")
Fixes 400816f60c54 ("perf/x86/intel: Implement support for TSX Force Abort")
---
 core.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/events/intel/core.c +1 -1
index 35102ec..baa7a2e 100644
@@ -4179,7 +4179,7 @@ static struct attribute *intel_pmu_caps_attrs[] = {
        NULL
 };
 
-DEVICE_BOOL_ATTR(allow_tsx_force_abort, 0644, allow_tsx_force_abort);
+static DEVICE_BOOL_ATTR(allow_tsx_force_abort, 0644, allow_tsx_force_abort);
 
 static struct attribute *intel_pmu_attrs[] = {
 	&dev_attr_freeze_on_smi.attr,

kbuild test robot

author build bot
#0 lore raw
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   5453a3df2a5eb49bc24615d4cf0d66b2aae05e5f
commit: 400816f60c543153656ac74eaf7f36f6b7202378 perf/x86/intel: Implement support for TSX Force Abort
date:   7 days ago
reproduce:
        # apt-get install sparse
        git checkout 400816f60c543153656ac74eaf7f36f6b7202378
        make ARCH=x86_64 allmodconfig
        make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

sparse warnings: (new ones prefixed by >>)

Please review and possibly fold the followup patch.

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

#2 lore raw

[tip:perf/urgent] perf/x86/intel: Make dev_attr_allow_tsx_force_abort static

In reply to kbuild test robot
perf/x86/intel: Make dev_attr_allow_tsx_force_abort static
Commit-ID:  c634dc6bdedeb0b2c750fc611612618a85639ab2
Gitweb:     https://git.kernel.org/tip/c634dc6bdedeb0b2c750fc611612618a85639ab2
Author:     kbuild test robot <[email protected]>
AuthorDate: Thu, 14 Mar 2019 02:42:43 +0800
Committer:  Thomas Gleixner <[email protected]>
CommitDate: Sun, 17 Mar 2019 08:40:18 +0100

perf/x86/intel: Make dev_attr_allow_tsx_force_abort static

Fixes 400816f60c54 ("perf/x86/intel: Implement support for TSX Force Abort")
Cc "Peter Zijlstra (Intel)" <[email protected]>
Cc Borislav Petkov <[email protected]>
Cc "H. Peter Anvin" <[email protected]>
Cc Kan Liang <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Andi Kleen <[email protected]>
---
 arch/x86/events/intel/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/events/intel/core.c +1 -1
index 92dfeb343a6a..8baa441d8000 100644
@@ -4179,7 +4179,7 @@ static struct attribute *intel_pmu_caps_attrs[] = {
        NULL
 };
 
-DEVICE_BOOL_ATTR(allow_tsx_force_abort, 0644, allow_tsx_force_abort);
+static DEVICE_BOOL_ATTR(allow_tsx_force_abort, 0644, allow_tsx_force_abort);
 
 static struct attribute *intel_pmu_attrs[] = {
 	&dev_attr_freeze_on_smi.attr,