Commit fbf5062a authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Kleber Sacilotto de Souza

hwmon: (ibmpowernv) Remove bogus __init annotations

BugLink: https://bugs.launchpad.net/bugs/1810958

[ Upstream commit e3e61f01 ]

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: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarJuerg Haefliger <juergh@canonical.com>
Signed-off-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
parent 83deea5e
...@@ -114,7 +114,7 @@ static ssize_t show_label(struct device *dev, struct device_attribute *devattr, ...@@ -114,7 +114,7 @@ static ssize_t show_label(struct device *dev, struct device_attribute *devattr,
return sprintf(buf, "%s\n", sdata->label); return sprintf(buf, "%s\n", sdata->label);
} }
static int __init get_logical_cpu(int hwcpu) static int get_logical_cpu(int hwcpu)
{ {
int cpu; int cpu;
...@@ -125,9 +125,8 @@ static int __init get_logical_cpu(int hwcpu) ...@@ -125,9 +125,8 @@ static int __init get_logical_cpu(int hwcpu)
return -ENOENT; return -ENOENT;
} }
static void __init make_sensor_label(struct device_node *np, static void make_sensor_label(struct device_node *np,
struct sensor_data *sdata, struct sensor_data *sdata, const char *label)
const char *label)
{ {
u32 id; u32 id;
size_t n; size_t n;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment