Skip to content

Commit

Permalink
hwmon: (ibmpowernv) Remove bogus __init annotations
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
  • Loading branch information
Geert Uytterhoeven authored and Guenter Roeck committed Nov 4, 2018
1 parent 74e3512 commit e3e61f0
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions drivers/hwmon/ibmpowernv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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;
Expand Down

0 comments on commit e3e61f0

Please sign in to comment.