mtd: mtk-nor: Drop bogus __init from mtk_nor_init()
Subsystems (3)
PATCH 1/1 mtd: mtk-nor: Drop bogus __init from mtk_nor_init()
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.
---
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(-)
drivers/mtd/spi-nor/mtk-quadspi.c +2 -2
@@ -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;
Signature · 1 line
1.9.1
Brian Norris
AppliedQuoted 6 lines · Geert Uytterhoeven
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 functionmtk_nor_drv_probe()references
the function__initmtk_nor_init().
This is often becausemtk_nor_drv_probelacks a__init
annotation or the annotation ofmtk_nor_initis wrong.
Quoted 6 lines
Drop the bogus
__initfrommtk_nor_init()to kill this warning.Signed-off-by Geert Uytterhoeven <[email protected]>---
Presumably this went unnoticed because some versions of gcc inlinemtk_nor_init()?
Pushed to l2-mtd.git. Thanks!