Skip to content

Commit 68e3f61

Browse files
geertuwilldeacon
authored andcommitted
ARM: perf: Mark all accessor functions inline
When just including <asm/arm_pmuv3.h>: arch/arm/include/asm/arm_pmuv3.h:110:13: error: ‘write_pmevtypern’ defined but not used [-Werror=unused-function] 110 | static void write_pmevtypern(int n, unsigned long val) | ^~~~~~~~~~~~~~~~ arch/arm/include/asm/arm_pmuv3.h:103:13: error: ‘write_pmevcntrn’ defined but not used [-Werror=unused-function] 103 | static void write_pmevcntrn(int n, unsigned long val) | ^~~~~~~~~~~~~~~ arch/arm/include/asm/arm_pmuv3.h:95:22: error: ‘read_pmevcntrn’ defined but not used [-Werror=unused-function] 95 | static unsigned long read_pmevcntrn(int n) | ^~~~~~~~~~~~~~ Fix this by adding the missing "inline" keywords to the three accessor functions that lack them. Fixes: 009d6dc ("ARM: perf: Allow the use of the PMUv3 driver on 32bit ARM") Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Mark Rutland <mark.rutland@arm.com> Reviewed-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/3a7d9bc7470aa2d85696ee9765c74f8c03fb5454.1683561482.git.geert+renesas@glider.be Signed-off-by: Will Deacon <will@kernel.org>
1 parent b0abde8 commit 68e3f61

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

arch/arm/include/asm/arm_pmuv3.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,22 +92,22 @@
9292

9393
#define RETURN_READ_PMEVCNTRN(n) \
9494
return read_sysreg(PMEVCNTR##n)
95-
static unsigned long read_pmevcntrn(int n)
95+
static inline unsigned long read_pmevcntrn(int n)
9696
{
9797
PMEVN_SWITCH(n, RETURN_READ_PMEVCNTRN);
9898
return 0;
9999
}
100100

101101
#define WRITE_PMEVCNTRN(n) \
102102
write_sysreg(val, PMEVCNTR##n)
103-
static void write_pmevcntrn(int n, unsigned long val)
103+
static inline void write_pmevcntrn(int n, unsigned long val)
104104
{
105105
PMEVN_SWITCH(n, WRITE_PMEVCNTRN);
106106
}
107107

108108
#define WRITE_PMEVTYPERN(n) \
109109
write_sysreg(val, PMEVTYPER##n)
110-
static void write_pmevtypern(int n, unsigned long val)
110+
static inline void write_pmevtypern(int n, unsigned long val)
111111
{
112112
PMEVN_SWITCH(n, WRITE_PMEVTYPERN);
113113
}

0 commit comments

Comments
 (0)