Skip to content

Commit 3bc879e

Browse files
geertuwilldeacon
authored andcommitted
arm64: perf: Mark all accessor functions inline
When just including <asm/arm_pmuv3.h>: arch/arm64/include/asm/arm_pmuv3.h:31:13: error: ‘write_pmevtypern’ defined but not used [-Werror=unused-function] 31 | static void write_pmevtypern(int n, unsigned long val) | ^~~~~~~~~~~~~~~~ arch/arm64/include/asm/arm_pmuv3.h:24:13: error: ‘write_pmevcntrn’ defined but not used [-Werror=unused-function] 24 | static void write_pmevcntrn(int n, unsigned long val) | ^~~~~~~~~~~~~~~ arch/arm64/include/asm/arm_pmuv3.h:16:22: error: ‘read_pmevcntrn’ defined but not used [-Werror=unused-function] 16 | static unsigned long read_pmevcntrn(int n) | ^~~~~~~~~~~~~~ Fix this by adding the missing "inline" keywords to the three accessor functions that lack them. Fixes: df29ddf ("arm64: perf: Abstract system register accesses away") Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Marc Zyngier <maz@kernel.org> Acked-by: Mark Rutland <mark.rutland@arm.com> Link: https://lore.kernel.org/r/d53a19043c0c3bd25f6c203e73a2fb08a9661824.1683561482.git.geert+renesas@glider.be Signed-off-by: Will Deacon <will@kernel.org>
1 parent 68e3f61 commit 3bc879e

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

arch/arm64/include/asm/arm_pmuv3.h

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

1414
#define RETURN_READ_PMEVCNTRN(n) \
1515
return read_sysreg(pmevcntr##n##_el0)
16-
static unsigned long read_pmevcntrn(int n)
16+
static inline unsigned long read_pmevcntrn(int n)
1717
{
1818
PMEVN_SWITCH(n, RETURN_READ_PMEVCNTRN);
1919
return 0;
2020
}
2121

2222
#define WRITE_PMEVCNTRN(n) \
2323
write_sysreg(val, pmevcntr##n##_el0)
24-
static void write_pmevcntrn(int n, unsigned long val)
24+
static inline void write_pmevcntrn(int n, unsigned long val)
2525
{
2626
PMEVN_SWITCH(n, WRITE_PMEVCNTRN);
2727
}
2828

2929
#define WRITE_PMEVTYPERN(n) \
3030
write_sysreg(val, pmevtyper##n##_el0)
31-
static void write_pmevtypern(int n, unsigned long val)
31+
static inline void write_pmevtypern(int n, unsigned long val)
3232
{
3333
PMEVN_SWITCH(n, WRITE_PMEVTYPERN);
3434
}

0 commit comments

Comments
 (0)