[Pdbg] [PATCH] libpdbg: Fix the declaration of __stop_hw_units

Amitay Isaacs amitay at ozlabs.org
Thu Mar 28 14:10:35 AEDT 2019


Now the type of the __stop_hw_units is correct, the cast is unnecessary.

Signed-off-by: Amitay Isaacs <amitay at ozlabs.org>
---
 libpdbg/target.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libpdbg/target.c b/libpdbg/target.c
index e678470..a46bf06 100644
--- a/libpdbg/target.c
+++ b/libpdbg/target.c
@@ -287,13 +287,13 @@ struct pdbg_target_class *get_target_class(const char *name)
 }
 
 extern struct hw_unit_info *__start_hw_units;
-extern struct hw_init_info *__stop_hw_units;
+extern struct hw_unit_info *__stop_hw_units;
 struct hw_unit_info *find_compatible_target(const char *compat)
 {
 	struct hw_unit_info **p;
 	struct pdbg_target *target;
 
-	for (p = &__start_hw_units; p < (struct hw_unit_info **) &__stop_hw_units; p++) {
+	for (p = &__start_hw_units; p < &__stop_hw_units; p++) {
 		target = (*p)->hw_unit;
 		if (!strcmp(target->compatible, compat))
 			return *p;
-- 
2.20.1



More information about the Pdbg mailing list