]> err.no Git - linux-2.6/commitdiff
[CASSINI]: Use shorter list_splice_init() macro for brevity.
authorRobert P. J. Day <rpjday@crashcourse.ca>
Mon, 24 Mar 2008 05:47:53 +0000 (22:47 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 24 Mar 2008 05:47:53 +0000 (22:47 -0700)
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/cassini.c

index 14299f8063af16341011a49e7156f2b60688465f..93e13636f8dda2fef5667cc544b99fb068f2ca17 100644 (file)
@@ -532,8 +532,7 @@ static void cas_spare_free(struct cas *cp)
        /* free spare buffers */
        INIT_LIST_HEAD(&list);
        spin_lock(&cp->rx_spare_lock);
-       list_splice(&cp->rx_spare_list, &list);
-       INIT_LIST_HEAD(&cp->rx_spare_list);
+       list_splice_init(&cp->rx_spare_list, &list);
        spin_unlock(&cp->rx_spare_lock);
        list_for_each_safe(elem, tmp, &list) {
                cas_page_free(cp, list_entry(elem, cas_page_t, list));
@@ -546,13 +545,11 @@ static void cas_spare_free(struct cas *cp)
         * lock than used everywhere else to manipulate this list.
         */
        spin_lock(&cp->rx_inuse_lock);
-       list_splice(&cp->rx_inuse_list, &list);
-       INIT_LIST_HEAD(&cp->rx_inuse_list);
+       list_splice_init(&cp->rx_inuse_list, &list);
        spin_unlock(&cp->rx_inuse_lock);
 #else
        spin_lock(&cp->rx_spare_lock);
-       list_splice(&cp->rx_inuse_list, &list);
-       INIT_LIST_HEAD(&cp->rx_inuse_list);
+       list_splice_init(&cp->rx_inuse_list, &list);
        spin_unlock(&cp->rx_spare_lock);
 #endif
        list_for_each_safe(elem, tmp, &list) {
@@ -573,8 +570,7 @@ static void cas_spare_recover(struct cas *cp, const gfp_t flags)
        /* make a local copy of the list */
        INIT_LIST_HEAD(&list);
        spin_lock(&cp->rx_inuse_lock);
-       list_splice(&cp->rx_inuse_list, &list);
-       INIT_LIST_HEAD(&cp->rx_inuse_list);
+       list_splice_init(&cp->rx_inuse_list, &list);
        spin_unlock(&cp->rx_inuse_lock);
 
        list_for_each_safe(elem, tmp, &list) {