diff options
author | Robert P. J. Day <rpjday@crashcourse.ca> | 2008-03-24 01:47:53 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-03-24 01:47:53 -0400 |
commit | 9bd512f619cc116b7830134d7c9f6e404a38c7bf (patch) | |
tree | 1d7cbda4dbfedaf079a88d2a2748c059806b7972 /drivers/net/cassini.c | |
parent | 80445cfb28a6b093540582b68d9ae928bf34cfe7 (diff) |
[CASSINI]: Use shorter list_splice_init() macro for brevity.
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/cassini.c')
-rw-r--r-- | drivers/net/cassini.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/net/cassini.c b/drivers/net/cassini.c index 14299f8063af..93e13636f8dd 100644 --- a/drivers/net/cassini.c +++ b/drivers/net/cassini.c | |||
@@ -532,8 +532,7 @@ static void cas_spare_free(struct cas *cp) | |||
532 | /* free spare buffers */ | 532 | /* free spare buffers */ |
533 | INIT_LIST_HEAD(&list); | 533 | INIT_LIST_HEAD(&list); |
534 | spin_lock(&cp->rx_spare_lock); | 534 | spin_lock(&cp->rx_spare_lock); |
535 | list_splice(&cp->rx_spare_list, &list); | 535 | list_splice_init(&cp->rx_spare_list, &list); |
536 | INIT_LIST_HEAD(&cp->rx_spare_list); | ||
537 | spin_unlock(&cp->rx_spare_lock); | 536 | spin_unlock(&cp->rx_spare_lock); |
538 | list_for_each_safe(elem, tmp, &list) { | 537 | list_for_each_safe(elem, tmp, &list) { |
539 | cas_page_free(cp, list_entry(elem, cas_page_t, list)); | 538 | cas_page_free(cp, list_entry(elem, cas_page_t, list)); |
@@ -546,13 +545,11 @@ static void cas_spare_free(struct cas *cp) | |||
546 | * lock than used everywhere else to manipulate this list. | 545 | * lock than used everywhere else to manipulate this list. |
547 | */ | 546 | */ |
548 | spin_lock(&cp->rx_inuse_lock); | 547 | spin_lock(&cp->rx_inuse_lock); |
549 | list_splice(&cp->rx_inuse_list, &list); | 548 | list_splice_init(&cp->rx_inuse_list, &list); |
550 | INIT_LIST_HEAD(&cp->rx_inuse_list); | ||
551 | spin_unlock(&cp->rx_inuse_lock); | 549 | spin_unlock(&cp->rx_inuse_lock); |
552 | #else | 550 | #else |
553 | spin_lock(&cp->rx_spare_lock); | 551 | spin_lock(&cp->rx_spare_lock); |
554 | list_splice(&cp->rx_inuse_list, &list); | 552 | list_splice_init(&cp->rx_inuse_list, &list); |
555 | INIT_LIST_HEAD(&cp->rx_inuse_list); | ||
556 | spin_unlock(&cp->rx_spare_lock); | 553 | spin_unlock(&cp->rx_spare_lock); |
557 | #endif | 554 | #endif |
558 | list_for_each_safe(elem, tmp, &list) { | 555 | list_for_each_safe(elem, tmp, &list) { |
@@ -573,8 +570,7 @@ static void cas_spare_recover(struct cas *cp, const gfp_t flags) | |||
573 | /* make a local copy of the list */ | 570 | /* make a local copy of the list */ |
574 | INIT_LIST_HEAD(&list); | 571 | INIT_LIST_HEAD(&list); |
575 | spin_lock(&cp->rx_inuse_lock); | 572 | spin_lock(&cp->rx_inuse_lock); |
576 | list_splice(&cp->rx_inuse_list, &list); | 573 | list_splice_init(&cp->rx_inuse_list, &list); |
577 | INIT_LIST_HEAD(&cp->rx_inuse_list); | ||
578 | spin_unlock(&cp->rx_inuse_lock); | 574 | spin_unlock(&cp->rx_inuse_lock); |
579 | 575 | ||
580 | list_for_each_safe(elem, tmp, &list) { | 576 | list_for_each_safe(elem, tmp, &list) { |