From: Robert P. J. Day Date: Fri, 25 Jul 2008 08:45:32 +0000 (-0700) Subject: lists: remove a redundant conditional definition of list_add() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e0ce0da9fefcc723dc006c35a7f91a32750abd40;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Cc: Dave Jones Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/include/linux/list.h b/include/linux/list.h index 139ec41d9c2e..453916bc0412 100644 --- a/include/linux/list.h +++ b/include/linux/list.h @@ -61,14 +61,10 @@ extern void __list_add(struct list_head *new, * Insert a new entry after the specified head. * This is good for implementing stacks. */ -#ifndef CONFIG_DEBUG_LIST static inline void list_add(struct list_head *new, struct list_head *head) { __list_add(new, head, head->next); } -#else -extern void list_add(struct list_head *new, struct list_head *head); -#endif /** diff --git a/lib/list_debug.c b/lib/list_debug.c index 4350ba9655bd..45c03fd608dd 100644 --- a/lib/list_debug.c +++ b/lib/list_debug.c @@ -39,20 +39,6 @@ void __list_add(struct list_head *new, } EXPORT_SYMBOL(__list_add); -/** - * list_add - add a new entry - * @new: new entry to be added - * @head: list head to add it after - * - * Insert a new entry after the specified head. - * This is good for implementing stacks. - */ -void list_add(struct list_head *new, struct list_head *head) -{ - __list_add(new, head, head->next); -} -EXPORT_SYMBOL(list_add); - /** * list_del - deletes entry from list. * @entry: the element to delete from the list.