Skip to contentSkip to conversation

test: Add udevice declaration to avoid build error

PATCH New Simon Glass 2 participants 2 messages Mar 27, 2021 – Mar 29, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 test: Add udevice declaration to avoid build error

When including this file on a board other than sandbox (e.g by enabling UNIT_TEST and CMD_SETEXPR) an results. Fix it by declaring struct udevice first.

---

 include/dm/test.h | 2 ++
 1 file changed, 2 insertions(+)
include/dm/test.h +2 -0
index fe1cc2e278c..59c51d6b30c 100644
@@ -6,6 +6,8 @@
 #ifndef __DM_TEST_H
 #define __DM_TEST_H
 
+struct udevice;
+
 /**
  * struct dm_test_cdata - configuration data for test instance
  *
Signature · 1 line
2.31.0.291.g576ba9dcdaf-goog
#1 lore raw

PATCH 1/1 test: Add udevice declaration to avoid build error

Quoted 6 lines · Simon Glass

When including this file on a board other than sandbox (e.g by enabling UNIT_TEST and CMD_SETEXPR) an results. Fix it by declaring struct udevice first.

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/20210328/92193e8c/attachment.sig>