[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20140716.151050.974076735111970390.davem@davemloft.net>
Date: Wed, 16 Jul 2014 15:10:50 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: jon.maloy@...csson.com
Cc: netdev@...r.kernel.org, paul.gortmaker@...driver.com,
erik.hugne@...csson.com, ying.xue@...driver.com, maloy@...jonn.com,
tipc-discussion@...ts.sourceforge.net
Subject: Re: [PATCH net-next 3/7] tipc: add new functions for multicast and
broadcast distribution
From: Jon Maloy <jon.maloy@...csson.com>
Date: Tue, 15 Jul 2014 13:46:06 -0400
> + /* Copy header if single buffer */
> + if (!buf->next) {
> + hdr_sz = skb_headroom(buf) + msg_hdr_sz(buf_msg(buf));
> + head = __pskb_copy(buf, hdr_sz, GFP_ATOMIC);
> + if (likely(head))
> + return head;
> + return NULL;
These last four lines are simply:
return __pskb_copy(buf, hdr_sz, GFP_ATOMIC);
Don't make this code more complicated than necessary :)
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists