首页 > 代码库 > Embeded linux之内核编译错误警告汇总

Embeded linux之内核编译错误警告汇总

错误A:

WARNING: drivers/spi/hi_spi.o(.data+0x0): Section mismatch in reference from the variable hi_spi_platform_driver to the function .init.text:hi_spi_probe()
The variable hi_spi_platform_driver references
the function __init hi_spi_probe()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console

解决A:

__init同一个c文件用了两处。

去掉hi_spi_probe()前的__init

 

错误B:

drivers/net/ethernet/hieth-gmac/bcm53101.c:249:13: warning: ‘bcm53101_dump’ defined but not used [-Wunused-function]
static void bcm53101_dump(void)

解决B:

函数写了 没用到。

屏蔽掉函数

 

Embeded linux之内核编译错误警告汇总