Gitweb:
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0b858e6ff9a38b987a83d22e6f2a2f621c80608d
Commit: 0b858e6ff9a38b987a83d22e6f2a2f621c80608d
Parent: 818c357802e2791880057fe752dc9ce9e210f772
Author: Li Zefan <[EMAIL PROTECTED]>
AuthorDate: Fri Feb 8 04:19:24 2008 -0800
Committer: Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Fri Feb 8 09:22:29 2008 -0800
clockevent: simplify list operations
list_for_each_safe() suffices here.
Signed-off-by: Li Zefan <[EMAIL PROTECTED]>
Cc: Thomas Gleixner <[EMAIL PROTECTED]>
Cc: Ingo Molnar <[EMAIL PROTECTED]>
Cc: john stultz <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
kernel/time/clockevents.c | 11 ++++-------
1 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/kernel/time/clockevents.c b/kernel/time/clockevents.c
index 3e59fce..1d327f6 100644
--- a/kernel/time/clockevents.c
+++ b/kernel/time/clockevents.c
@@ -218,6 +218,8 @@ void clockevents_exchange_device(struct clock_event_device
*old,
*/
void clockevents_notify(unsigned long reason, void *arg)
{
+ struct list_head *node, *tmp;
+
spin_lock(&clockevents_lock);
clockevents_do_notify(reason, arg);
@@ -227,13 +229,8 @@ void clockevents_notify(unsigned long reason, void *arg)
* Unregister the clock event devices which were
* released from the users in the notify chain.
*/
- while (!list_empty(&clockevents_released)) {
- struct clock_event_device *dev;
-
- dev = list_entry(clockevents_released.next,
- struct clock_event_device, list);
- list_del(&dev->list);
- }
+ list_for_each_safe(node, tmp, &clockevents_released)
+ list_del(node);
break;
default:
break;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html