net: replace uses of NIP6_FMT with %p6
[firefly-linux-kernel-4.4.55.git] / include / net / sctp / sctp.h
index 17b932b8a55a771f12248a7909f07950552bf4d8..a84c3976e1b0e38d9a60a1b8aedce01e036b7387 100644 (file)
@@ -285,9 +285,9 @@ extern int sctp_debug_flag;
        if (sctp_debug_flag) { \
                if (saddr->sa.sa_family == AF_INET6) { \
                        printk(KERN_DEBUG \
-                              lead NIP6_FMT trail, \
+                              lead "%p6" trail, \
                               leadparm, \
-                              NIP6(saddr->v6.sin6_addr), \
+                              &saddr->v6.sin6_addr, \
                               otherparms); \
                } else { \
                        printk(KERN_DEBUG \
@@ -303,7 +303,7 @@ extern int sctp_debug_flag;
 #define SCTP_ASSERT(expr, str, func) \
        if (!(expr)) { \
                SCTP_DEBUG_PRINTK("Assertion Failed: %s(%s) at %s:%s:%d\n", \
-                       str, (#expr), __FILE__, __FUNCTION__, __LINE__); \
+                       str, (#expr), __FILE__, __func__, __LINE__); \
                func; \
        }
 
@@ -406,10 +406,7 @@ struct sctp_association *sctp_id2assoc(struct sock *sk, sctp_assoc_t id);
 
 /* A macro to walk a list of skbs.  */
 #define sctp_skb_for_each(pos, head, tmp) \
-for (pos = (head)->next;\
-     tmp = (pos)->next, pos != ((struct sk_buff *)(head));\
-     pos = tmp)
-
+       skb_queue_walk_safe(head, pos, tmp)
 
 /* A helper to append an entire skb list (list) to another (head). */
 static inline void sctp_skb_list_tail(struct sk_buff_head *list,
@@ -420,10 +417,7 @@ static inline void sctp_skb_list_tail(struct sk_buff_head *list,
        sctp_spin_lock_irqsave(&head->lock, flags);
        sctp_spin_lock(&list->lock);
 
-       list_splice((struct list_head *)list, (struct list_head *)head->prev);
-
-       head->qlen += list->qlen;
-       list->qlen = 0;
+       skb_queue_splice_tail_init(list, head);
 
        sctp_spin_unlock(&list->lock);
        sctp_spin_unlock_irqrestore(&head->lock, flags);