LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: "Cédric Le Goater" <clg@fr.ibm.com>,
	"Jean Delvare" <jdelvare@suse.com>,
	"Benjamin Herrenschmidt" <benh@kernel.crashing.org>,
	"Paul Mackerras" <paulus@samba.org>,
	"Michael Ellerman" <mpe@ellerman.id.au>,
	linux-hwmon@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] hwmon: (ibmpowernv) Remove bogus __init annotations
Date: Tue, 30 Oct 2018 11:23:30 -0700	[thread overview]
Message-ID: <20181030182330.GA25641@roeck-us.net> (raw)
In-Reply-To: <20181028171651.30751-1-geert@linux-m68k.org>

On Sun, Oct 28, 2018 at 06:16:51PM +0100, Geert Uytterhoeven wrote:
> If gcc decides not to inline make_sensor_label():
> 
>     WARNING: vmlinux.o(.text+0x4df549c): Section mismatch in reference from the function .create_device_attrs() to the function .init.text:.make_sensor_label()
>     The function .create_device_attrs() references
>     the function __init .make_sensor_label().
>     This is often because .create_device_attrs lacks a __init
>     annotation or the annotation of .make_sensor_label is wrong.
> 
> As .probe() can be called after freeing of __init memory, all __init
> annotiations in the driver are bogus, and should be removed.
> 
> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>

Applied.

Thanks,
Guenter

> ---
> Compile-tested only.
> ---
>  drivers/hwmon/ibmpowernv.c | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/hwmon/ibmpowernv.c b/drivers/hwmon/ibmpowernv.c
> index 0ccca87f527191dc..293dd1c6c7b36ef2 100644
> --- a/drivers/hwmon/ibmpowernv.c
> +++ b/drivers/hwmon/ibmpowernv.c
> @@ -181,7 +181,7 @@ static ssize_t show_label(struct device *dev, struct device_attribute *devattr,
>  	return sprintf(buf, "%s\n", sdata->label);
>  }
>  
> -static int __init get_logical_cpu(int hwcpu)
> +static int get_logical_cpu(int hwcpu)
>  {
>  	int cpu;
>  
> @@ -192,9 +192,8 @@ static int __init get_logical_cpu(int hwcpu)
>  	return -ENOENT;
>  }
>  
> -static void __init make_sensor_label(struct device_node *np,
> -				     struct sensor_data *sdata,
> -				     const char *label)
> +static void make_sensor_label(struct device_node *np,
> +			      struct sensor_data *sdata, const char *label)
>  {
>  	u32 id;
>  	size_t n;

      reply	other threads:[~2018-10-30 18:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-28 17:16 Geert Uytterhoeven
2018-10-30 18:23 ` Guenter Roeck [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181030182330.GA25641@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=benh@kernel.crashing.org \
    --cc=clg@fr.ibm.com \
    --cc=geert@linux-m68k.org \
    --cc=jdelvare@suse.com \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=paulus@samba.org \
    --subject='Re: [PATCH] hwmon: (ibmpowernv) Remove bogus __init annotations' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).