ahci: mediatek: fix undefined reference of dev_err
Subsystems (2)
PATCH 1/1 ahci: mediatek: fix undefined reference of dev_err
From: Frank Wunderlich <[email protected]>
building with MTK_AHCI enabled results in implicit declaration and undefined reference of dev_err followed by a segfault of gcc
drivers/ata/mtk_ahci.c: In function 'mtk_ahci_parse_property':drivers/ata/mtk_ahci.c:65:4: warning:
implicit declaration of function 'dev_err' drivers/ata/mtk_ahci.c:65: undefined reference to dev_err' in function mtk_ahci_probe':drivers/ata/mtk_ahci.c:92: undefined reference to `dev_err' Segmentation fault
fix this by adding the dm/device_compat.h to includes
--- drivers/ata/mtk_ahci.c | 1 + 1 file changed, 1 insertion(+)
drivers/ata/mtk_ahci.c +1 -0
@@ -21,6 +21,7 @@#include <sata.h> #include <scsi.h> #include <syscon.h> +#include <dm/device_compat.h> #define SYS_CFG 0x14#define SYS_CFG_SATA_MSK GENMASK(31, 30)
Signature · 1 line
2.25.1
PATCH 1/1 ahci: mediatek: fix undefined reference of dev_err
Quoted 13 lines · Frank Wunderlich
From: Frank Wunderlich <[email protected]>
building with
MTK_AHCIenabled results in implicit declaration and undefined reference ofdev_errfollowed by a segfault of gcc
drivers/ata/mtk_ahci.c: In function 'mtk_ahci_parse_property':drivers/ata/mtk_ahci.c:65:4: warning:
implicit declaration of function 'dev_err'drivers/ata/mtk_ahci.c:65: undefined reference todev_err' in functionmtk_ahci_probe':drivers/ata/mtk_ahci.c:92: undefined reference to `dev_err' Segmentation fault
Quoted 3 lines
fix this by adding the
dm/device_compat.hto includesSigned-off-by Frank Wunderlich <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210319/efe0a0d1/attachment.sig>