diff options
-rw-r--r-- | drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c | 3 | ||||
-rw-r--r-- | include/linux/list.h | 16 | ||||
-rw-r--r-- | kernel/events/core.c | 3 |
3 files changed, 16 insertions, 6 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c index 32a9609cc98b..fd50781e996c 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c | |||
@@ -1038,9 +1038,6 @@ static void bnx2x_set_one_vlan_mac_e1h(struct bnx2x *bp, | |||
1038 | ETH_VLAN_FILTER_CLASSIFY, config); | 1038 | ETH_VLAN_FILTER_CLASSIFY, config); |
1039 | } | 1039 | } |
1040 | 1040 | ||
1041 | #define list_next_entry(pos, member) \ | ||
1042 | list_entry((pos)->member.next, typeof(*(pos)), member) | ||
1043 | |||
1044 | /** | 1041 | /** |
1045 | * bnx2x_vlan_mac_restore - reconfigure next MAC/VLAN/VLAN-MAC element | 1042 | * bnx2x_vlan_mac_restore - reconfigure next MAC/VLAN/VLAN-MAC element |
1046 | * | 1043 | * |
diff --git a/include/linux/list.h b/include/linux/list.h index b83e5657365a..83a9576f479f 100644 --- a/include/linux/list.h +++ b/include/linux/list.h | |||
@@ -373,6 +373,22 @@ static inline void list_splice_tail_init(struct list_head *list, | |||
373 | (!list_empty(ptr) ? list_first_entry(ptr, type, member) : NULL) | 373 | (!list_empty(ptr) ? list_first_entry(ptr, type, member) : NULL) |
374 | 374 | ||
375 | /** | 375 | /** |
376 | * list_next_entry - get the next element in list | ||
377 | * @pos: the type * to cursor | ||
378 | * @member: the name of the list_struct within the struct. | ||
379 | */ | ||
380 | #define list_next_entry(pos, member) \ | ||
381 | list_entry((pos)->member.next, typeof(*(pos)), member) | ||
382 | |||
383 | /** | ||
384 | * list_prev_entry - get the prev element in list | ||
385 | * @pos: the type * to cursor | ||
386 | * @member: the name of the list_struct within the struct. | ||
387 | */ | ||
388 | #define list_prev_entry(pos, member) \ | ||
389 | list_entry((pos)->member.prev, typeof(*(pos)), member) | ||
390 | |||
391 | /** | ||
376 | * list_for_each - iterate over a list | 392 | * list_for_each - iterate over a list |
377 | * @pos: the &struct list_head to use as a loop cursor. | 393 | * @pos: the &struct list_head to use as a loop cursor. |
378 | * @head: the head for your list. | 394 | * @head: the head for your list. |
diff --git a/kernel/events/core.c b/kernel/events/core.c index f8eb2b154bdb..ac9b8cce3df2 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c | |||
@@ -2016,9 +2016,6 @@ static void __perf_event_sync_stat(struct perf_event *event, | |||
2016 | perf_event_update_userpage(next_event); | 2016 | perf_event_update_userpage(next_event); |
2017 | } | 2017 | } |
2018 | 2018 | ||
2019 | #define list_next_entry(pos, member) \ | ||
2020 | list_entry(pos->member.next, typeof(*pos), member) | ||
2021 | |||
2022 | static void perf_event_sync_stat(struct perf_event_context *ctx, | 2019 | static void perf_event_sync_stat(struct perf_event_context *ctx, |
2023 | struct perf_event_context *next_ctx) | 2020 | struct perf_event_context *next_ctx) |
2024 | { | 2021 | { |