Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1310123 > unrolled thread

[PATCH] mtd: mtk-nor: Drop bogus __init from mtk_nor_init()

Started byGeert Uytterhoeven <geert@linux-m68k.org>
First post2016-01-15 14:50 +0100
Last post2016-01-15 19:10 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] mtd: mtk-nor: Drop bogus __init from mtk_nor_init() Geert Uytterhoeven <geert@linux-m68k.org> - 2016-01-15 14:50 +0100
    Re: [PATCH] mtd: mtk-nor: Drop bogus __init from mtk_nor_init() Brian Norris <computersforpeace@gmail.com> - 2016-01-15 19:10 +0100

#1310123 — [PATCH] mtd: mtk-nor: Drop bogus __init from mtk_nor_init()

FromGeert Uytterhoeven <geert@linux-m68k.org>
Date2016-01-15 14:50 +0100
Subject[PATCH] mtd: mtk-nor: Drop bogus __init from mtk_nor_init()
Message-ID<qRcVk-6OR-17@gated-at.bofh.it>
WARNING: drivers/mtd/spi-nor/mtk-quadspi.o(.text+0x77e): Section mismatch in reference from the function mtk_nor_drv_probe() to the function .init.text:mtk_nor_init()
The function mtk_nor_drv_probe() references
the function __init mtk_nor_init().
This is often because mtk_nor_drv_probe lacks a __init
annotation or the annotation of mtk_nor_init is wrong.

Drop the bogus __init from mtk_nor_init() to kill this warning.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
Presumably this went unnoticed because some versions of gcc inline
mtk_nor_init()?
---
 drivers/mtd/spi-nor/mtk-quadspi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mtd/spi-nor/mtk-quadspi.c b/drivers/mtd/spi-nor/mtk-quadspi.c
index d5f850d035bb93fb..8bed1a4cb79ce585 100644
--- a/drivers/mtd/spi-nor/mtk-quadspi.c
+++ b/drivers/mtd/spi-nor/mtk-quadspi.c
@@ -371,8 +371,8 @@ static int mt8173_nor_write_reg(struct spi_nor *nor, u8 opcode, u8 *buf,
 	return ret;
 }
 
-static int __init mtk_nor_init(struct mt8173_nor *mt8173_nor,
-			       struct device_node *flash_node)
+static int mtk_nor_init(struct mt8173_nor *mt8173_nor,
+			struct device_node *flash_node)
 {
 	int ret;
 	struct spi_nor *nor;
-- 
1.9.1

[toc] | [next] | [standalone]


#1310340

FromBrian Norris <computersforpeace@gmail.com>
Date2016-01-15 19:10 +0100
Message-ID<qRgYV-1jy-9@gated-at.bofh.it>
In reply to#1310123
On Fri, Jan 15, 2016 at 02:46:29PM +0100, Geert Uytterhoeven wrote:
> WARNING: drivers/mtd/spi-nor/mtk-quadspi.o(.text+0x77e): Section mismatch in reference from the function mtk_nor_drv_probe() to the function .init.text:mtk_nor_init()
> The function mtk_nor_drv_probe() references
> the function __init mtk_nor_init().
> This is often because mtk_nor_drv_probe lacks a __init
> annotation or the annotation of mtk_nor_init is wrong.
> 
> Drop the bogus __init from mtk_nor_init() to kill this warning.
> 
> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
> ---
> Presumably this went unnoticed because some versions of gcc inline
> mtk_nor_init()?

Pushed to l2-mtd.git. Thanks!

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web