* + timerqueue-use-rb_entry_safe.patch added to -mm tree
@ 2016-12-20 22:07 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2016-12-20 22:07 UTC (permalink / raw)
To: geliangtang, john.stultz, tglx, mm-commits
The patch titled
Subject: lib/timerqueue.c: use rb_entry_safe
has been added to the -mm tree. Its filename is
timerqueue-use-rb_entry_safe.patch
This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/timerqueue-use-rb_entry_safe.patch
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/timerqueue-use-rb_entry_safe.patch
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/SubmitChecklist when testing your code ***
The -mm tree is included into linux-next and is updated
there every 3-4 working days
------------------------------------------------------
From: Geliang Tang <geliangtang@gmail.com>
Subject: lib/timerqueue.c: use rb_entry_safe
Use rb_entry_safe() instead of open-coding it.
Link: http://lkml.kernel.org/r/0d5cf199ac43792df0b6f7e2145545c30fa1dbbe.1482222135.git.geliangtang@gmail.com
Signed-off-by: Geliang Tang <geliangtang@gmail.com>
Cc: John Stultz <john.stultz@linaro.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
lib/timerqueue.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff -puN lib/timerqueue.c~timerqueue-use-rb_entry_safe lib/timerqueue.c
--- a/lib/timerqueue.c~timerqueue-use-rb_entry_safe
+++ a/lib/timerqueue.c
@@ -80,8 +80,7 @@ bool timerqueue_del(struct timerqueue_he
if (head->next == node) {
struct rb_node *rbn = rb_next(&node->node);
- head->next = rbn ?
- rb_entry(rbn, struct timerqueue_node, node) : NULL;
+ head->next = rb_entry_safe(rbn, struct timerqueue_node, node);
}
rb_erase(&node->node, &head->head);
RB_CLEAR_NODE(&node->node);
_
Patches currently in -mm which might be from geliangtang@gmail.com are
timerqueue-use-rb_entry_safe.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-12-20 22:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-20 22:07 + timerqueue-use-rb_entry_safe.patch added to -mm tree akpm
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.