1. 程式人生 > >Embeded linux之內核編譯錯誤警告匯總

Embeded linux之內核編譯錯誤警告匯總

match efi mbed 屏蔽 警告 .text section fin 內核

錯誤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之內核編譯錯誤警告匯總