]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/4.14.93/w90p910_ether-remove-incorrect-__init-annotation.patch
Linux 4.19.15
[thirdparty/kernel/stable-queue.git] / releases / 4.14.93 / w90p910_ether-remove-incorrect-__init-annotation.patch
1 From 3862e49355b6f45e8a4c517d16aa74400ead0e02 Mon Sep 17 00:00:00 2001
2 From: Arnd Bergmann <arnd@arndb.de>
3 Date: Mon, 10 Dec 2018 21:45:07 +0100
4 Subject: w90p910_ether: remove incorrect __init annotation
5
6 [ Upstream commit 51367e423c6501a26e67d91a655d2bc892303462 ]
7
8 The get_mac_address() function is normally inline, but when it is
9 not, we get a warning that this configuration is broken:
10
11 WARNING: vmlinux.o(.text+0x4aff00): Section mismatch in reference from the function w90p910_ether_setup() to the function .init.text:get_mac_address()
12 The function w90p910_ether_setup() references
13 the function __init get_mac_address().
14 This is often because w90p910_ether_setup lacks a __init
15
16 Remove the __init to make it always do the right thing.
17
18 Signed-off-by: Arnd Bergmann <arnd@arndb.de>
19 Signed-off-by: David S. Miller <davem@davemloft.net>
20 Signed-off-by: Sasha Levin <sashal@kernel.org>
21 ---
22 drivers/net/ethernet/nuvoton/w90p910_ether.c | 2 +-
23 1 file changed, 1 insertion(+), 1 deletion(-)
24
25 diff --git a/drivers/net/ethernet/nuvoton/w90p910_ether.c b/drivers/net/ethernet/nuvoton/w90p910_ether.c
26 index 4a67c55aa9f1..11a9add81849 100644
27 --- a/drivers/net/ethernet/nuvoton/w90p910_ether.c
28 +++ b/drivers/net/ethernet/nuvoton/w90p910_ether.c
29 @@ -912,7 +912,7 @@ static const struct net_device_ops w90p910_ether_netdev_ops = {
30 .ndo_validate_addr = eth_validate_addr,
31 };
32
33 -static void __init get_mac_address(struct net_device *dev)
34 +static void get_mac_address(struct net_device *dev)
35 {
36 struct w90p910_ether *ether = netdev_priv(dev);
37 struct platform_device *pdev;
38 --
39 2.19.1
40