Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: 009d6dc87a56 ("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>

authored by

Geert Uytterhoeven and committed by
Will Deacon
68e3f61e b0abde80

+3 -3
+3 -3
arch/arm/include/asm/arm_pmuv3.h
··· 92 92 93 93 #define RETURN_READ_PMEVCNTRN(n) \ 94 94 return read_sysreg(PMEVCNTR##n) 95 - static unsigned long read_pmevcntrn(int n) 95 + static inline unsigned long read_pmevcntrn(int n) 96 96 { 97 97 PMEVN_SWITCH(n, RETURN_READ_PMEVCNTRN); 98 98 return 0; ··· 100 100 101 101 #define WRITE_PMEVCNTRN(n) \ 102 102 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) 104 104 { 105 105 PMEVN_SWITCH(n, WRITE_PMEVCNTRN); 106 106 } 107 107 108 108 #define WRITE_PMEVTYPERN(n) \ 109 109 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) 111 111 { 112 112 PMEVN_SWITCH(n, WRITE_PMEVTYPERN); 113 113 }