Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752474Ab3JaFp7 (ORCPT ); Thu, 31 Oct 2013 01:45:59 -0400 Received: from hermes.synopsys.com ([198.182.44.81]:62438 "EHLO hermes.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750762Ab3JaFp5 convert rfc822-to-8bit (ORCPT ); Thu, 31 Oct 2013 01:45:57 -0400 From: Vineet Gupta To: Chen Gang , "linux-arch@vger.kernel.org" , Mike Frysinger , "James E.J. Bottomley" , Helge Deller , "Arnd Bergmann" , Thomas Gleixner , "Paul Gortmaker" , "Srivatsa S. Bhat" , realmz paranoid , James Bottomley CC: "linux-kernel@vger.kernel.org" , "uclinux-dist-devel@blackfin.uclinux.org" , Parisc List , Andrew Morton Subject: Re: [PATCH] arch: *: remove '__init' for setup_profiling_timer() Thread-Topic: [PATCH] arch: *: remove '__init' for setup_profiling_timer() Thread-Index: AQHOz5Rzfa7H6x8+K0mEPsxJa/nqdw== Date: Thu, 31 Oct 2013 05:45:48 +0000 Message-ID: References: <52672ECD.9010800@asianux.com> Accept-Language: en-US, en-IN Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.12.239.237] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2566 Lines: 69 On 10/23/2013 07:36 AM, Chen Gang wrote: > Most of architectures not use '__init' for setup_profiling_timer(), so > need remove it, or can generate warning (e.g. arc with allmodconfig): > > MODPOST vmlinux.o > WARNING: vmlinux.o(.text+0x3c682): Section mismatch in reference from the function write_profile() to the function .init.text:setup_profiling_timer() > The function write_profile() references > the function __init setup_profiling_timer(). > This is often because write_profile lacks a __init > annotation or the annotation of setup_profiling_timer is wrong. > > > Signed-off-by: Chen Gang > --- > arch/arc/kernel/smp.c | 2 +- > arch/blackfin/mach-bf561/smp.c | 2 +- > arch/parisc/kernel/smp.c | 2 +- > 3 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/arch/arc/kernel/smp.c b/arch/arc/kernel/smp.c > index bca3052..3bdac11 100644 > --- a/arch/arc/kernel/smp.c > +++ b/arch/arc/kernel/smp.c > @@ -187,7 +187,7 @@ int __cpu_up(unsigned int cpu, struct task_struct *idle) > /* > * not supported here > */ > -int __init setup_profiling_timer(unsigned int multiplier) > +int setup_profiling_timer(unsigned int multiplier) > { > return -EINVAL; > } > diff --git a/arch/blackfin/mach-bf561/smp.c b/arch/blackfin/mach-bf561/smp.c > index 11789be..3bef058 100644 > --- a/arch/blackfin/mach-bf561/smp.c > +++ b/arch/blackfin/mach-bf561/smp.c > @@ -43,7 +43,7 @@ void __init platform_prepare_cpus(unsigned int max_cpus) > init_cpu_present(&mask); > } > > -int __init setup_profiling_timer(unsigned int multiplier) /* not supported */ > +int setup_profiling_timer(unsigned int multiplier) /* not supported */ > { > return -EINVAL; > } > diff --git a/arch/parisc/kernel/smp.c b/arch/parisc/kernel/smp.c > index 8a252f2..2e8cd36 100644 > --- a/arch/parisc/kernel/smp.c > +++ b/arch/parisc/kernel/smp.c > @@ -433,7 +433,7 @@ int __cpu_up(unsigned int cpu, struct task_struct *tidle) > } > > #ifdef CONFIG_PROC_FS > -int __init > +int > setup_profiling_timer(unsigned int multiplier) > { > return -EINVAL; In theory this change is OK. However this is legacy code at best and it would be better to define a weak definition in kernel/profile.c and remove this cruft from relevant arches. I'll send out a patch. -Vineet -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/