mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/2] list: rename debugging hooks
@ 2024-01-03 10:19 Ahmad Fatoum
  2024-01-03 10:19 ` [PATCH 2/2] lib: add optional linked list debugging Ahmad Fatoum
  2024-01-04  9:12 ` [PATCH 1/2] list: rename debugging hooks Sascha Hauer
  0 siblings, 2 replies; 3+ messages in thread
From: Ahmad Fatoum @ 2024-01-03 10:19 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

Linux recently renamed the name of these helpers, so have barebox follow
suit before implementing them out of line when optional list debugging
is enabled.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 include/linux/list.h | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/include/linux/list.h b/include/linux/list.h
index 1341806b59da..60b0111f467c 100644
--- a/include/linux/list.h
+++ b/include/linux/list.h
@@ -37,18 +37,18 @@ static inline void INIT_LIST_HEAD(struct list_head *list)
 }
 
 #ifdef CONFIG_DEBUG_LIST
-extern bool __list_add_valid(struct list_head *new,
-			      struct list_head *prev,
-			      struct list_head *next);
-extern bool __list_del_entry_valid(struct list_head *entry);
+extern bool __list_add_valid_or_report(struct list_head *new,
+				       struct list_head *prev,
+				       struct list_head *next);
+extern bool __list_del_entry_valid_or_report(struct list_head *entry);
 #else
-static inline bool __list_add_valid(struct list_head *new,
-				struct list_head *prev,
-				struct list_head *next)
+static inline bool __list_add_valid_or_report(struct list_head *new,
+					      struct list_head *prev,
+					      struct list_head *next)
 {
 	return true;
 }
-static inline bool __list_del_entry_valid(struct list_head *entry)
+static inline bool __list_del_entry_valid_or_report(struct list_head *entry)
 {
 	return true;
 }
@@ -64,7 +64,7 @@ static inline void __list_add(struct list_head *new,
 			      struct list_head *prev,
 			      struct list_head *next)
 {
-	if (!__list_add_valid(new, prev, next))
+	if (!__list_add_valid_or_report(new, prev, next))
 		return;
 
 	next->prev = new;
@@ -129,7 +129,7 @@ static inline void __list_del_clearprev(struct list_head *entry)
 
 static inline void __list_del_entry(struct list_head *entry)
 {
-	if (!__list_del_entry_valid(entry))
+	if (!__list_del_entry_valid_or_report(entry))
 		return;
 
 	__list_del(entry->prev, entry->next);
-- 
2.39.2




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-01-04  9:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-03 10:19 [PATCH 1/2] list: rename debugging hooks Ahmad Fatoum
2024-01-03 10:19 ` [PATCH 2/2] lib: add optional linked list debugging Ahmad Fatoum
2024-01-04  9:12 ` [PATCH 1/2] list: rename debugging hooks Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox