aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@redhat.com>2013-11-12 18:10:01 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-05-31 00:52:14 -0400
commit634207ccdaaaa8429ab4230216013554097cc76f (patch)
treef8a2725c131694738612684152861d8c55eab290 /kernel
parent6d611183634723139f9f77ecef77ed8cb1e5789c (diff)
list: introduce list_next_entry() and list_prev_entry()
[ Upstream commit 008208c6b26f21c2648c250a09c55e737c02c5f8 ] Add two trivial helpers list_next_entry() and list_prev_entry(), they can have a lot of users including list.h itself. In fact the 1st one is already defined in events/core.c and bnx2x_sp.c, so the patch simply moves the definition to list.h. Signed-off-by: Oleg Nesterov <oleg@redhat.com> Cc: Eilon Greenstein <eilong@broadcom.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/events/core.c3
1 files changed, 0 insertions, 3 deletions
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
2022static void perf_event_sync_stat(struct perf_event_context *ctx, 2019static 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{