From: Andi Kleen Date: Fri, 29 Aug 2014 17:20:58 +0000 (-0700) Subject: perf/x86: Fix section mismatch in split uncore driver X-Git-Tag: v4.14-rc1~6680^2~20 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a08b6769d4c5e8d2a3192a45e40b3cdcca0da6a1;p=platform%2Fkernel%2Flinux-rpi.git perf/x86: Fix section mismatch in split uncore driver The new split Intel uncore driver code that recently went into tip added a section mismatch, which the build process complains about. uncore_pmu_register() can be called from uncore_pci_probe,() which is not __init and can be called from pci driver ->probe. I'm not fully sure if it's actually possible to call the probe function later, but it seems safer to mark uncore_pmu_register not __init. This also fixes the warning. Signed-off-by: Andi Kleen Signed-off-by: Peter Zijlstra (Intel) Link: http://lkml.kernel.org/r/1409332858-29039-1-git-send-email-andi@firstfloor.org Signed-off-by: Ingo Molnar --- diff --git a/arch/x86/kernel/cpu/perf_event_intel_uncore.c b/arch/x86/kernel/cpu/perf_event_intel_uncore.c index 4785ee8..812ec5d 100644 --- a/arch/x86/kernel/cpu/perf_event_intel_uncore.c +++ b/arch/x86/kernel/cpu/perf_event_intel_uncore.c @@ -661,7 +661,7 @@ static struct attribute_group uncore_pmu_attr_group = { .attrs = uncore_pmu_attrs, }; -static int __init uncore_pmu_register(struct intel_uncore_pmu *pmu) +static int uncore_pmu_register(struct intel_uncore_pmu *pmu) { int ret;