Skip to content

Commit e0ce0da

Browse files
rpjdaytorvalds
authored andcommitted
lists: remove a redundant conditional definition of list_add()
Remove the conditional surrounding the definition of list_add() from list.h since, if you define CONFIG_DEBUG_LIST, the definition you will subsequently pick up from lib/list_debug.c will be absolutely identical, at which point you can remove that redundant definition from list_debug.c as well. Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Cc: Dave Jones <davej@codemonkey.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent fd19382 commit e0ce0da

File tree

2 files changed

+0
-18
lines changed

2 files changed

+0
-18
lines changed

include/linux/list.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,10 @@ extern void __list_add(struct list_head *new,
6161
* Insert a new entry after the specified head.
6262
* This is good for implementing stacks.
6363
*/
64-
#ifndef CONFIG_DEBUG_LIST
6564
static inline void list_add(struct list_head *new, struct list_head *head)
6665
{
6766
__list_add(new, head, head->next);
6867
}
69-
#else
70-
extern void list_add(struct list_head *new, struct list_head *head);
71-
#endif
7268

7369

7470
/**

lib/list_debug.c

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -39,20 +39,6 @@ void __list_add(struct list_head *new,
3939
}
4040
EXPORT_SYMBOL(__list_add);
4141

42-
/**
43-
* list_add - add a new entry
44-
* @new: new entry to be added
45-
* @head: list head to add it after
46-
*
47-
* Insert a new entry after the specified head.
48-
* This is good for implementing stacks.
49-
*/
50-
void list_add(struct list_head *new, struct list_head *head)
51-
{
52-
__list_add(new, head, head->next);
53-
}
54-
EXPORT_SYMBOL(list_add);
55-
5642
/**
5743
* list_del - deletes entry from list.
5844
* @entry: the element to delete from the list.

0 commit comments

Comments
 (0)