
From: Zhengyuan Liu <liuzhengyuan@tj.kylinos.cn> hulk inclusion category: bugfix bugzilla: NA CVE: NA The specifier of __init added to hrd_flashProbe() isn't appropriate. It can cause following building warning: WARNING: drivers/mtd/hisilicon/sfc/hi-sfc.o(.text.unlikely+0x38c): Section mismatch in reference from the \ function flash_map_init() to the function .init.text:hrd_flashProbe() The function flash_map_init() references the function __init hrd_flashProbe(). This is often because flash_map_init lacks a __init annotation or the annotation of hrd_flashProbe is wrong. Fixes: 4a81715b7bf2 ("drivers: add sfc driver to hulk") Signed-off-by: Zhengyuan Liu <liuzhengyuan@tj.kylinos.cn> Reviewed-by: Hanjun Guo <guohanjun@huawei.com> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Signed-off-by: Cheng Jian <cj.chengjian@huawei.com> --- drivers/mtd/hisilicon/sfc/hrd_sfc_driver.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mtd/hisilicon/sfc/hrd_sfc_driver.c b/drivers/mtd/hisilicon/sfc/hrd_sfc_driver.c index 23254e325a85..69fb1b306f0d 100644 --- a/drivers/mtd/hisilicon/sfc/hrd_sfc_driver.c +++ b/drivers/mtd/hisilicon/sfc/hrd_sfc_driver.c @@ -87,8 +87,8 @@ static int _hrd_flashProbe(const char **mtdDrv, struct map_info *map, return HRD_ERR; } -static int __init hrd_flashProbe(const char **mtdDrv, struct map_info *map, - struct resource *sfc_regres, struct mtd_info **mtd) +static int hrd_flashProbe(const char **mtdDrv, struct map_info *map, + struct resource *sfc_regres, struct mtd_info **mtd) { int ret; -- 2.25.1