diff options
author | Nick Child <nick.child@ibm.com> | 2021-12-16 17:00:19 -0500 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2021-12-23 22:33:11 +1100 |
commit | c49f5d88ff0166ffa4e48ee8ce84d63719f346be (patch) | |
tree | c813f743dde45f2c55049c017cfbca906900fbf3 /arch/powerpc/perf/core-book3s.c | |
parent | c13f2b2bb5afd90f152c389c1c9245a0d43bce80 (diff) | |
download | lwn-c49f5d88ff0166ffa4e48ee8ce84d63719f346be.tar.gz lwn-c49f5d88ff0166ffa4e48ee8ce84d63719f346be.zip |
powerpc/perf: Add __init attribute to eligible functions
Some functions defined in 'arch/powerpc/perf' are deserving of an
`__init` macro attribute. These functions are only called by other
initialization functions and therefore should inherit the attribute.
Also, change function declarations in header files to include `__init`.
Signed-off-by: Nick Child <nick.child@ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20211216220035.605465-5-nick.child@ibm.com
Diffstat (limited to 'arch/powerpc/perf/core-book3s.c')
-rw-r--r-- | arch/powerpc/perf/core-book3s.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/perf/core-book3s.c b/arch/powerpc/perf/core-book3s.c index 07fd61a8d59d..a684901b6965 100644 --- a/arch/powerpc/perf/core-book3s.c +++ b/arch/powerpc/perf/core-book3s.c @@ -2479,7 +2479,7 @@ static int power_pmu_prepare_cpu(unsigned int cpu) return 0; } -int register_power_pmu(struct power_pmu *pmu) +int __init register_power_pmu(struct power_pmu *pmu) { if (ppmu) return -EBUSY; /* something's already registered */ |