From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758208Ab3IBH55 (ORCPT ); Mon, 2 Sep 2013 03:57:57 -0400 Received: from intranet.asianux.com ([58.214.24.6]:48846 "EHLO intranet.asianux.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758156Ab3IBH5z (ORCPT ); Mon, 2 Sep 2013 03:57:55 -0400 X-Spam-Score: -100.9 Message-ID: <522444C3.3000701@asianux.com> Date: Mon, 02 Sep 2013 15:56:51 +0800 From: Chen Gang User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: Arnd Bergmann CC: Greg KH , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] drivers: misc: bmp085: remove '__init' from mp085_get_of_properties() References: <5224441B.9090305@asianux.com> In-Reply-To: <5224441B.9090305@asianux.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org It seems the "./scripts/get_maintainer.pl" is not quite precise, it lead me to send this mail to kernel mailing list, not to drivers related mailing list. [root@gchenlinux linux-next]# ./scripts/get_maintainer.pl /tmp/0001-drivers-misc-bmp085-remove-__init-from-mp085_get_of_.patch Arnd Bergmann (supporter:CHAR and MISC DRI...) Greg Kroah-Hartman (supporter:CHAR and MISC DRI...) linux-kernel@vger.kernel.org (open list) Thanks. On 09/02/2013 03:54 PM, Chen Gang wrote: > bmp085_get_of_properties() is called by bmp085_init_client() which is > called by bmp085_probe() which is an EXPORT_SYMBOL_GPL function. > > bmp085_probe() is really used as a probe function by another modules > (e.g. bmp085-i2c.c, bmp085-spi.c). > > Except bmp085_get_of_properties(), all functions have no '__init', so > need remove '__init' from bmp085_get_of_properties() too, or at least, > it will report related warning: > > WARNING: vmlinux.o(.text+0x4c8a07): Section mismatch in reference from the variable .LM171 to the variable .init.text:_bmp085_get_of_properties > The function .LM171() references > the variable __init _bmp085_get_of_properties. > This is often because .LM171 lacks a __init > annotation or the annotation of _bmp085_get_of_properties is wrong. > > > Signed-off-by: Chen Gang > --- > drivers/misc/bmp085.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/drivers/misc/bmp085.c b/drivers/misc/bmp085.c > index 849e2fe..2704d88 100644 > --- a/drivers/misc/bmp085.c > +++ b/drivers/misc/bmp085.c > @@ -374,7 +374,7 @@ int bmp085_detect(struct device *dev) > } > EXPORT_SYMBOL_GPL(bmp085_detect); > > -static void __init bmp085_get_of_properties(struct bmp085_data *data) > +static void bmp085_get_of_properties(struct bmp085_data *data) > { > #ifdef CONFIG_OF > struct device_node *np = data->dev->of_node; > -- Chen Gang