[IrDA]: Use alloc_skb() in IrDA TX path

As pointed out by Christoph Hellwig, dev_alloc_skb() is not intended to be
used for allocating TX sk_buff. The IrDA stack was exclusively calling
dev_alloc_skb() on the TX path, and this patch fixes that.

Signed-off-by: Samuel Ortiz <samuel@sortiz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Samuel Ortiz
2006-07-21 14:50:41 -07:00
committed by David S. Miller
parent b826315813
commit 485fb2c998
12 changed files with 38 additions and 35 deletions

View File

@@ -117,7 +117,7 @@ void irlap_send_snrm_frame(struct irlap_cb *self, struct qos_info *qos)
IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
/* Allocate frame */
tx_skb = dev_alloc_skb(64);
tx_skb = alloc_skb(64, GFP_ATOMIC);
if (!tx_skb)
return;
@@ -210,7 +210,7 @@ void irlap_send_ua_response_frame(struct irlap_cb *self, struct qos_info *qos)
IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
/* Allocate frame */
tx_skb = dev_alloc_skb(64);
tx_skb = alloc_skb(64, GFP_ATOMIC);
if (!tx_skb)
return;
@@ -250,7 +250,7 @@ void irlap_send_dm_frame( struct irlap_cb *self)
IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
tx_skb = dev_alloc_skb(32);
tx_skb = alloc_skb(32, GFP_ATOMIC);
if (!tx_skb)
return;
@@ -282,7 +282,7 @@ void irlap_send_disc_frame(struct irlap_cb *self)
IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
tx_skb = dev_alloc_skb(16);
tx_skb = alloc_skb(16, GFP_ATOMIC);
if (!tx_skb)
return;
@@ -315,7 +315,7 @@ void irlap_send_discovery_xid_frame(struct irlap_cb *self, int S, __u8 s,
IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
IRDA_ASSERT(discovery != NULL, return;);
tx_skb = dev_alloc_skb(64);
tx_skb = alloc_skb(64, GFP_ATOMIC);
if (!tx_skb)
return;
@@ -576,7 +576,7 @@ void irlap_send_rr_frame(struct irlap_cb *self, int command)
struct sk_buff *tx_skb;
__u8 *frame;
tx_skb = dev_alloc_skb(16);
tx_skb = alloc_skb(16, GFP_ATOMIC);
if (!tx_skb)
return;
@@ -601,7 +601,7 @@ void irlap_send_rd_frame(struct irlap_cb *self)
struct sk_buff *tx_skb;
__u8 *frame;
tx_skb = dev_alloc_skb(16);
tx_skb = alloc_skb(16, GFP_ATOMIC);
if (!tx_skb)
return;
@@ -1215,7 +1215,7 @@ void irlap_send_test_frame(struct irlap_cb *self, __u8 caddr, __u32 daddr,
struct test_frame *frame;
__u8 *info;
tx_skb = dev_alloc_skb(cmd->len+sizeof(struct test_frame));
tx_skb = alloc_skb(cmd->len+sizeof(struct test_frame), GFP_ATOMIC);
if (!tx_skb)
return;